Search code examples
pythonspeech-recognitionpyaudio

The system cannot find the file specified - Python Speech Recognition


enter image description here

import speech_recognition as sr

listener = sr.Recognizer()

try:
    with sr.Microphone() as source:
        print("listening...")
        voice = listener.listen(source)
        info = listener.recognize_google(voice)
        print(info)

except Exception as e:
    print(e)

It shows: [WinError 2] The system cannot find the file specified

The expected output should be printing all the stuff that I say.

I have already installed PyAudio using pipwin.


Solution

  • This issue was resolved by resetting up the path variable for the python interpreter. Thanks for all the answers and your efforts