语音请求错误中的Google的Cloud Speech API异常

安克

我正在尝试使用Google Voice Kit附带的cloudspeech_demo.py程序。我已经按照以下链接设置了Google的Cloud语音API:https//aiyprojects.withgoogle.com/voice/#makers-guide-3-1--change-to-the-cloud-speech-api

但我收到此错误:

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

我在网上搜索了很多内容,但找不到任何有用的信息。任何帮助表示赞赏。谢谢!

耶茹

自4月份起该API的beta版已被弃用,并且正在被拒绝我相信AIY代码已经更新,可以解决此问题,因此希望您能够使用git pull该代码,并且应该可以再次使用。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章