I want to use google.cloud library on my Google App Engine python application. In my local all my tests work since I installed this library on my local. I was expecting it t
Try this: sudo pip install --upgrade google-cloud-speech
Or:
I'm using another library,
Does this method help you up?
import speech_recognition as sp
import time
print("Say something!")
while True:
rec = sp.Recognizer()
with sp.Microphone() as mic:
audio = rec.listen(mic)
try:
print(rec.recognize_google(audio))
except sp.UnknownValueError:
print("I cannot understand what you said")
time.sleep(0.5)
print("Say again")
except sp.RequestError as e:
print("Error".format(e))
word = rec.recognize_google(audio)
if word == 'goodbye':
break
Installation:
sudo pip install SpeechRecognition
sudo pip install pyaudio
If you found an error:
sudo apt-get install python-pyaudio
sudo apt-get install libjack-jackd2-dev portaudio19-dev
Then again:
sudo pip install pyaudio
If you found error try this:
sudo pip install --upgrade pyaudio