0

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.

Go For Pro
  • 115
  • 1
  • 8
  • Possible Duplicate: https://stackoverflow.com/questions/62185166/python-speechrecognition-cant-find-file –  Dec 23 '20 at 07:26

3 Answers3

0

Hi Install pyaudio using pipwin

pipwin install pyaudio

enter image description here

Jethen
  • 82
  • 1
  • 7
0

I also had the same problem, what I did was:

First install pipwin using pip:

pip install pipwin

Then install pyaudio using pipwin:

pipwin install pyaudio
Nishith Savla
  • 310
  • 2
  • 10
0

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

Go For Pro
  • 115
  • 1
  • 8