JavaScript
x
14
14
1
import speech_recognition as sr
2
3
listener = sr.Recognizer()
4
5
try:
6
with sr.Microphone() as source:
7
print("listening...")
8
voice = listener.listen(source)
9
info = listener.recognize_google(voice)
10
print(info)
11
12
except Exception as e:
13
print(e)
14
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.
Advertisement
Answer
This issue was resolved by resetting up the path variable for the python interpreter. Thanks for all the answers and your efforts