I use anaconda and SpeechRecognition.
(我使用anaconda和SpeechRecognition。)
But I get error on recognize_google. (但是我在Recognize_google上收到错误消息。)
How can I fix it? (我该如何解决?)
my code and the error I received below: (我的代码和以下错误:)
import speech_recognition as sr
r=sr.Recognizer()
audio_file = sr.AudioFile('harvard.wav')
with audio_file as source:
r.adjust_for_ambient_noise(source)
audio = r.record(source)
r.recognize_google(audio)
r.recognize_google(audio)
Traceback (most recent call last):
File "<ipython-input-16-59c33ef07a2e>", line 1, in <module>
r.recognize_google(audio)
File "C:UsersasusAnaconda3libsite-packagesspeech_recognition\__init__.py", line 828, in recognize_google
File "C:UsersasusAnaconda3libsite-packagesspeech_recognition\__init__.py", line 457, in get_flac_data
File "C:UsersasusAnaconda3libsite-packagesspyder_kernelscustomizespydercustomize.py", line 143, in __init__
super(SubprocessPopen, self).__init__(*args, **kwargs)
File "C:UsersasusAnaconda3libsubprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:UsersasusAnaconda3libsubprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] System cannot find the file specified
ask by rukiye translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…