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
  • 8

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
  • 107
  • 1
  • 7
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
  • 8