Description
After installing the required dependencies, the tests of the streaming Speech API don't pass. The live speech recognition (speech_streaming.py) also don't work: no error is raised, but no response from the Google Cloud server is received, even if Streaming RecognizeRequest are sent regularly.
(googlecloud) raphael@debian-raphael:~/Documents/Projets/ZebrIA/python-docs-samples/speech/api$ python -m pytest speech_streaming_test.py
================================================================================== test session starts ===================================================================================
platform linux2 -- Python 2.7.9, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/raphael/Documents/Projets/ZebrIA/python-docs-samples/speech/api, inifile:
collected 1 items
speech_streaming_test.py F
======================================================================================== FAILURES ========================================================================================
_______________________________________________________________________________________ test_main ________________________________________________________________________________________
resource = <function at 0x7fedc94b3668>, monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x7fedc94b97e8>
capsys = <_pytest.capture.CaptureFixture instance at 0x7fedc94b97a0>
@pytest.mark.skipif(
sys.version_info >= (3, 0),
reason=("grpc doesn't yet support python3 "
'https://github.com/grpc/grpc/issues/282'))
def test_main(resource, monkeypatch, capsys):
monkeypatch.setattr(
speech_streaming, 'record_audio',
mock_audio_stream(resource('quit.raw')))
monkeypatch.setattr(speech_streaming, 'DEADLINE_SECS', 5)
speech_streaming.main()
speech_streaming_test.py:70:
speech_streaming.py:141: in main
request_stream(stop_audio), DEADLINE_SECS))
speech_streaming.py:117: in listen_print_loop
for resp in recognize_stream:
self = <grpc.framework.crust._control.Rendezvous object at 0x7fedc94ce790>
def next(self):
with self._condition:
while True:
if self._termination.abortion_error is not None:
raise self._termination.abortion_error
E LocalError: LocalError(code=StatusCode.UNIMPLEMENTED, details="GRPC target method is not implemented.")
/home/raphael/.virtualenvs/googlecloud/local/lib/python2.7/site-packages/grpc/framework/crust/_control.py:415: LocalError