I have been working on converting speech to text using speech_recognition
library on my Jupyter Notebook. All of a sudden, the code throws an error and I have no idea where to even start to solve this. The code is shown below:
import speech_recognition as sr
r = sr.Recognizer()
with sr.AudioFile('/audio1659122935.wav') as source:
audio_text = r.record(source)
try:
txt = r.recognize_google(audio_text)
print(text)
except:
print('Error... Try again...')
This generates the except
message "Error... Try again...
"
Did anyone have the same issue with using speech_recognition
?
The speech_recognition
version is 3.8.1 and my python version is 3.8.5