簡體   English   中英

語音請求錯誤中的Google的Cloud Speech API異常

[英]Google's Cloud speech API Exception in speech request error

我正在嘗試使用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該代碼,並且應該可以再次使用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM