mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
refactor
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from loguru import logger
|
||||
|
||||
# Get the input file name from the command line argument
|
||||
input_file = sys.argv[1]
|
||||
input_file = sys.argv[1]
|
||||
# example use: python 0-reflector-local.py input.m4a agenda.txt
|
||||
|
||||
# Get the agenda file name from the command line argument if provided
|
||||
@@ -21,7 +22,7 @@ if not os.path.exists(agenda_file):
|
||||
# Check if the input file is .m4a, if so convert to .mp4
|
||||
if input_file.endswith(".m4a"):
|
||||
subprocess.run(["ffmpeg", "-i", input_file, f"{input_file}.mp4"])
|
||||
input_file = f"{input_file}.mp4"
|
||||
input_file = f"{input_file}.mp4"
|
||||
|
||||
# Run the first script to generate the transcript
|
||||
subprocess.run(["python3", "1-transcript-generator.py", input_file, f"{input_file}_transcript.txt"])
|
||||
@@ -30,4 +31,4 @@ subprocess.run(["python3", "1-transcript-generator.py", input_file, f"{input_fil
|
||||
subprocess.run(["python3", "2-agenda-transcript-diff.py", agenda_file, f"{input_file}_transcript.txt"])
|
||||
|
||||
# Run the third script to summarize the transcript
|
||||
subprocess.run(["python3", "3-transcript-summarizer.py", f"{input_file}_transcript.txt", f"{input_file}_summary.txt"])
|
||||
subprocess.run(["python3", "3-transcript-summarizer.py", f"{input_file}_transcript.txt", f"{input_file}_summary.txt"])
|
||||
|
||||
Reference in New Issue
Block a user