Closed Brethitmanhart closed 1 year ago
I am getting the same error. Whisper worked fine a few days ago when I ran this. Not sure what changed.
Same here, was working fine before tho
I literally have the same problem, I even installed whisper again and tried to update it including utils, but to no avail. Really wanted to use this program
same issue here!
Oh I see, API change for whisper.utils
happened on 1/21/23, see this commit https://github.com/openai/whisper/commit/da600abd2b296a5450770b872c3765d0a5a5c769
I'll post the changes required in a sec when I get it working. Basically they changed to a new pattern for writing diff filetypes
Someone helped me out over at OpenAI's repo
pip uninstall whisper
pip install openai-whisper==20230117
to install the older version, or for new usage:
from whisper.utils import get_writer
writer = get_writer("vtt", str(transcription_root))
writer(whispers[k], f"{audio_fpath}.{k}")
Source: https://github.com/openai/whisper/discussions/880#discussioncomment-4761006
OH!!! Thank you so much @mattpetters !! I'm new to this whole thing so it took me a bit of trial and error to understand what to do but it ended up working when I went here
And replaced this here !pip install git+https://github.com/openai/whisper
With this !pip install openai-whisper==20230117
Had to restart the whole session from scratch too, make the change before running anything...
Hope this helps someone!
OH!!! Thank you so much @mattpetters !! I'm new to this whole thing so it took me a bit of trial and error to understand what to do but it ended up working when I went here
And replaced this here !pip install git+https://github.com/openai/whisper
With this !pip install openai-whisper==20230117
Had to restart the whole session from scratch too, make the change before running anything...
Hope this helps someone!
Not a problem, happy to help! I also forked this project and may be making some QOL updates on that. Super fun stuff
!pip install openai-whisper==20230117 did the trick! Thanks!!
I'm still getting that error even after doing the "!pip install openai-whisper==20230117" what else should I do? @mattpetters ? Any recommendations? Is it just that one line of code?
updated the notebook to work with the latest whisper, should be all good now! thanks for your patience folks.
I'm getting this error on the infer speech from audio step. Anyone else getting this error? If so, how did you fix it?
I really have no idea of coding so I hope I'm not being painful here - but the infer speech step won't run for me. The error is below
" AttributeError: module 'whisper.utils' has no attribute 'write_vtt' "
Here is a paste of a bit more of the code.
Transcribing audio with whisper-large elapsed: 24.86028742790222 Transcribing audio with whisper-tiny elapsed: 9.15235447883606
AttributeError Traceback (most recent call last) in
215 with open(outpath,'w') as f:
216 # to do: upstream PR to control verbosity
--> 217 whisper.utils.write_vtt(
218 whispers[k]["segments"], # ...really?
219 file=f
AttributeError: module 'whisper.utils' has no attribute 'write_vtt'
If I need to do anything else please let me know. Thanks!!!