I m working on Python 3.6.3 using conda 4.6.9 and it already has pyaudio 0.2.11 and speech recognition 3.8.1 in anaconda
but on running the code, I m still getting the error
if LooseVersion(pyaudio.__version__) < LooseVersion("0.2.11"):
AttributeError: module 'pyaudio' has no attribute '__version__'
why I m still getting this error when I m using the latest version of pyaudio.
python code:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print('speak say anything')
audio = r.listen(source)
try:
text = r.recognize_google(audio)
print("you said:{}".format(text))
except:
print("cant recognize")