1

I am trying to record audio in colab and convert that into text using speech recognition module. I used this answer to record in colab and it works fine, if i download the wav file, i can hear everything clearly. Just that when i load my audio file for speech recognition module, it gives this error:

Error: file does not start with RIFF id

This id the code that gives the error:

  audiox = record()
  
  inp = sr.AudioFile(audio)

# convert mp3 file to wav file

  with inp as file:
      audio = r.record(file)
      text=r.recognize_google(audio)
      print(text)
  return text
SoulD82
  • 93
  • 1
  • 9

0 Answers0