diff --git a/Video_Killed_The_Radio_Star_Defusion.ipynb b/Video_Killed_The_Radio_Star_Defusion.ipynb index aaf7289..5f25a2d 100644 --- a/Video_Killed_The_Radio_Star_Defusion.ipynb +++ b/Video_Killed_The_Radio_Star_Defusion.ipynb @@ -506,14 +506,15 @@ " transcriptions = {}\n", " transcription_root = root / 'whispers'\n", " transcription_root.mkdir(parents=True, exist_ok=True)\n", + " writer = whisper.utils.get_writer(output_format='vtt', output_dir=transcription_root) # output dir doesn't do anything...?\n", " for k in whispers:\n", " outpath = str( transcription_root / f\"{k}.vtt\" )\n", " transcriptions[k] = outpath\n", " with open(outpath,'w') as f:\n", " # to do: upstream PR to control verbosity\n", - " whisper.utils.write_vtt(\n", - " whispers[k][\"segments\"], # ...really?\n", - " file=f\n", + " writer.write_result(\n", + " whispers[k],\n", + " file=f,\n", " )\n", " storyboard.params.whisper.transcriptions = transcriptions\n", "\n", @@ -1354,4 +1355,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +}