Spaces:
Runtime error
Runtime error
karin.brisker
commited on
Commit
·
f655787
1
Parent(s):
fd4af30
typing
Browse files- audio_to_transcript.py +3 -2
audio_to_transcript.py
CHANGED
|
@@ -33,11 +33,12 @@ class TranscribeAudio:
|
|
| 33 |
log(f"Saving output to {directory} directory as {filename}.vtt")
|
| 34 |
srt_writer = whisper.utils.get_writer("srt", directory)
|
| 35 |
vtt_writer = whisper.utils.get_writer("vtt", directory)
|
|
|
|
| 36 |
# Save as an SRT file
|
| 37 |
-
srt_writer(transcript_output, audio_file_path,
|
| 38 |
|
| 39 |
# Save as a VTT file
|
| 40 |
-
vtt_writer(transcript_output, audio_file_path,
|
| 41 |
|
| 42 |
return f"{filename}.vtt"
|
| 43 |
|
|
|
|
| 33 |
log(f"Saving output to {directory} directory as {filename}.vtt")
|
| 34 |
srt_writer = whisper.utils.get_writer("srt", directory)
|
| 35 |
vtt_writer = whisper.utils.get_writer("vtt", directory)
|
| 36 |
+
|
| 37 |
# Save as an SRT file
|
| 38 |
+
srt_writer(result=transcript_output, audio_path=audio_file_path, options=self.options)
|
| 39 |
|
| 40 |
# Save as a VTT file
|
| 41 |
+
vtt_writer(result=transcript_output, audio_path=audio_file_path, options=self.options)
|
| 42 |
|
| 43 |
return f"{filename}.vtt"
|
| 44 |
|