I'm using the PyPi code ( https://pypi.org/project/SpeechRecognition/)
- cleaned up to use only Google Cloud SpeechRecognition.
- Google Json Credentials in shell's environment, and working.
I've enabled the Cloud Speech-to-Text API, got the Json credentials, and the service calls ARE hitting the API. The Microphone is fine, and the recording bit happens quickly.
However, its taking fully 80 seconds to perform the API call!
I've monitored the network traffic, and I can see that the API connection kinda sits idle for 78 seconds, and then TX/RXs really fast in the final 2 seconds. How can I speed this up?
Can it be slow-authentication handshake that I might mend?
Thanks a mil!
The delay happens on the 2nd last line here:
print("0 seconds")
try:
print("Google Cloud Speech thinks you said " + r.recognize_google_cloud(audio)
print("80th second")
from 80 second delay using Google Cloud SpeechRecognition with python 3.9 on RPi3B+
No comments:
Post a Comment