Ank
Ank

Reputation: 1904

Google's Cloud speech API Exception in speech request error

I am trying the cloudspeech_demo.py program which comes with the Google Voice Kit, on the same. I have set up the Google's Cloud speech API as per the link: https://aiyprojects.withgoogle.com/voice/#makers-guide-3-1--change-to-the-cloud-speech-api

But I am getting this error:

src/cloudspeech_demo.py /home/pi/AIY-voice-kit-python/src/aiy/_drivers/_led.py:51: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(channel, GPIO.OUT)
Press the button and speak
Listening...
Traceback (most recent call last):
  File "/home/pi/AIY-voice-kit-python/src/aiy/_apis/_speech.py", line 263, in do_request
    return self._handle_response_stream(response_stream)
  File "/home/pi/AIY-voice-kit-python/src/aiy/_apis/_speech.py", line 208, in _handle_response_stream
    for resp in response_stream:
  File "/home/pi/AIY-voice-kit-python/env/lib/python3.4/site-packages/grpc/_channel.py", line 348, in __next__
    return self._next()
  File "/home/pi/AIY-voice-kit-python/env/lib/python3.4/site-packages/grpc/_channel.py", line 342, in _next
    raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.UNIMPLEMENTED, GRPC target method can't be resolved.)>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "src/cloudspeech_demo.py", line 53, in <module>
    main()
  File "src/cloudspeech_demo.py", line 37, in main
    text = recognizer.recognize()
  File "/home/pi/AIY-voice-kit-python/src/aiy/cloudspeech.py", line 47, in recognize
    return self._request.do_request().transcript
  File "/home/pi/AIY-voice-kit-python/src/aiy/_apis/_speech.py", line 268, in do_request
    raise Error('Exception in speech request') from exc
aiy._apis._speech.Error: Exception in speech request

I searched a lot online, but couldn't find anything useful. Any help is appreciated. Thanks!

Upvotes: 2

Views: 687

Answers (1)

jerjou
jerjou

Reputation: 1506

The beta version of the API has been deprecated since April, and is in the process of being turned down. I believe the AIY code has been updated to fix this, so hopefully you should be able to git pull the code and it should Just Work again.

Upvotes: 4

Related Questions