update short scripts

This commit is contained in:
2026-07-21 16:50:05 -04:00
parent 19e525d64c
commit 8e4a34dce1
6 changed files with 179 additions and 28 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ from whisper.utils import get_writer
model = whisper.load_model("base")
def extract_audio(video_path, audio_temp_path):
def extract_audio(video_path: str, audio_temp_path: str):
# Create a temporary path for a sanitized copy of the video
sanitized_video_path = video_path.replace(".mp4", "_clean.mp4")
@@ -40,7 +40,7 @@ def extract_audio(video_path, audio_temp_path):
os.remove(sanitized_video_path)
def transcribe_to_srt(audio_path, output_directory, output_filename):
def transcribe_to_srt(audio_path: str, output_directory: str, output_filename: str):
print("Transcribing audio...")
result = model.transcribe(audio_path)