I got some code from google for speech recognition when i try to run that code i'm getting "NotImplementedError" please see the below code and help me.I'm using Mac.
import speech_recognition as sr
r = sr.Recognizer()
with sr.Recognizer() as source:
print("Speak Anything")
audio = r.listen(source)
try:
text = r.recognize_google(audio)
print("you said:{}".format(text))
except NotImplementedError:
print("Sorry could not recognise your voice")
Traceback (most recent call last):
File "", line 4, in with sr.Recognizer() as source:
File "/Users/chiku/anaconda3/lib/python3.5/site-packages/speech_recognition/init.py", line 51, in enter raise NotImplementedError("this is an abstract class")
NotImplementedError: this is an abstract class
Traceback (most recent call last):
File "", line 4, in with sr.Recognizer() as source:
File "/Users/chiku/anaconda3/lib/python3.5/site-packages/speech_recognition/init.py", line 51, in enter raise NotImplementedError("this is an abstract class")
NotImplementedError: this is an abstract class