jojojaeger / whisper-streamlit

this master thesis project is based on OpenAI Whisper with the goal to transcibe interviews
https://openai.com/research/whisper
Other
41 stars 16 forks source link

Transcription fails with TypeError: DecodingOptions.__init__() got an unexpected keyword argument 'word_timestamps' Traceback: #3

Closed menelic closed 1 year ago

menelic commented 1 year ago

After solving #2 the interface runs but fails transcription with the error below. This is despite https://github.com/hayabhay/whisper-ui working well on the same system. But since your version would be more helpful for scientific analysis of qualitative data, it would be great if you could fix this.

TypeError: DecodingOptions.init() got an unexpected keyword argument 'word_timestamps' Traceback:

File "/home/..../.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/home/..../whisper-streamlit/Transcribe.py", line 37, in st.session_state.transcription.transcribe( File "/home/..../whisper-streamlit/transcriber.py", line 34, in transcribe self.raw_output = transcriber.transcribe( File "/home/..../.local/lib/python3.10/site-packages/whisper/transcribe.py", line 181, in transcribe result: DecodingResult = decode_with_fallback(segment) File "/home/..../.local/lib/python3.10/site-packages/whisper/transcribe.py", line 116, in decode_with_fallback options = DecodingOptions(**kwargs, temperature=t)

jojojaeger commented 1 year ago

have you tried running pip install --upgrade --no-deps --force-reinstall git+https://github.com/openai/whisper.git Looks like the error is caused because of the word_level timestaps - there are newly introduced with a new whisper release. Let me know if that works!

menelic commented 1 year ago

Thanks - I successfully installed openai-whisper-20230314 as advised, but when I started teh streamlit app I still got:

2023-05-26 12:38:14.560 Uncaught app exception Traceback (most recent call last): File "/home/.../.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/home/.../whisper-streamlit/Transcribe.py", line 2, in from transcriber import Transcription File "/home/.../whisper-streamlit/transcriber.py", line 1, in import whisper File "/home/.../.local/lib/python3.10/site-packages/whisper/init.py", line 12, in from .decoding import DecodingOptions, DecodingResult, decode, detect_language File "/home/.../.local/lib/python3.10/site-packages/whisper/decoding.py", line 11, in from .tokenizer import Tokenizer, get_tokenizer File "/home/.../.local/lib/python3.10/site-packages/whisper/tokenizer.py", line 8, in import tiktoken ModuleNotFoundError: No module named 'tiktoken'

jojojaeger commented 1 year ago

ah i think you also need to install that: pip install tiktoken Just try to install the modules that are listed at missing