I have the following audio file
It says the word 'down'
I am trying to turn the audio to text:
import speech_recognition
r = sr.Recognizer()
with sr.AudioFile("example.wav") as source:
audio = r.record(source)
audio_data = r.listen(source)
try:
s = r.recognize_google(audio)
print("Text: "+s)
except Exception as e:
print("Exception: "+str(e))
I get the error:
ValueError: Audio file could not be read as PCM WAV, AIFF/AIFF-C, or Native FLAC; check if file is corrupted or in another format
I tried all the solutions here
I tried to convert the audio file using wavio
and scipy.io.wavfile
Any idea how to get around this?
I am using speech_recognition 3.9.0 and python 3.9