You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:- with tempfile.NamedTemporaryFile(suffix=".wav") as f:
f.write(audio_data.get_wav_data())
f.flush()
result = self.whisper_model[model].transcribe(
f.name,
language=language,
task="translate" if translate else None,
fp16=torch.cuda.is_available(),
**transcribe_options
)
+ f.close()+ os.remove(f.name)
System information
(Delete all the statements that don't apply.)
My system is Windows 10.
My Python version is . (You can check this by running python -V.)
My Pip version is . (You can check this by running pip -V.)
My SpeechRecognition library version is . (You can check this by running python -c "import speech_recognition as sr;print(sr.__version__)".)
My PyAudio library version is / I don't have PyAudio installed. (You can check this by running python -c "import pyaudio as p;print(p.__version__)".)
My microphones are: (You can check this by running python -c "import speech_recognition as sr;print(sr.Microphone.list_microphone_names())".)
My working microphones are: (You can check this by running python -c "import speech_recognition as sr;print(sr.Microphone.list_working_microphones())".)
I installed PocketSphinx from . (For example, from the Debian repositories, from Homebrew, or from the source code.)
The text was updated successfully, but these errors were encountered:
Thanks to Fungus for sharing.
Expected behaviour
There is no failure.
Actual behaviour
The following code fails unless the code of the Shared workaround
speech_recognition/speech_recognition/__init__.py
Lines 1694 to 1703 in 353d4ef
Shared workaround
System information
(Delete all the statements that don't apply.)
My system is Windows 10.
My Python version is . (You can check this by running
python -V
.)My Pip version is . (You can check this by running
pip -V
.)My SpeechRecognition library version is . (You can check this by running
python -c "import speech_recognition as sr;print(sr.__version__)"
.)My PyAudio library version is / I don't have PyAudio installed. (You can check this by running
python -c "import pyaudio as p;print(p.__version__)"
.)My microphones are: (You can check this by running
python -c "import speech_recognition as sr;print(sr.Microphone.list_microphone_names())"
.)My working microphones are: (You can check this by running
python -c "import speech_recognition as sr;print(sr.Microphone.list_working_microphones())"
.)I installed PocketSphinx from . (For example, from the Debian repositories, from Homebrew, or from the source code.)
The text was updated successfully, but these errors were encountered: