update short scripts
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user