-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speech_streaming tests do not pass #403
Comments
We merged a version of the sample that was using an internal-only version of the API. We've reverted that change. Can you try this again with the latest code? |
(closing, but feel free to respond and I'll re-open if needed) |
An import error occurs, because in speech_streaming.py, the module name was not corrected during the import. After fixing this ImportError, I get another one: (googlecloud) raphael@debian-raphael:~/ZebrIA/python-docs-samples/speech/api$ python -m pytest speech_streaming_test.py speech_streaming_test.py F ============================================================================== FAILURES ============================================================================== resource = <function at 0x7f62f2f2e668>, monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x7f62f2f39830>
speech_streaming_test.py:70: speech_streaming.py:139: in main self = <grpc.framework.crust.implementations._DynamicStub object at 0x7f62f21e32d0>, attr = 'Recognize'
|
@puneith as well. |
@raphael0202 does the sample itself work if you run it directly? |
@jonparrott I have the same error if I run speech_streaming.py directly: Traceback (most recent call last): |
Great, just making sure. And you are on the latest HEAD of master, right? |
Could you please do this and use google.cloud.speech.v1 instead of google.cloud.speech.v1beta1 and see if it fixes the problem? Because we rollback please refer to the original README and run the instructions again. Sorry for the inconvenience. Thanks. |
Yes, latest HEAD on master branch. Did you manage to reproduce the bug? Traceback (most recent call last): |
Ok, I used
But now everything works, both the tests and the script. |
It did install |
Yes indeed. And yes this is resolved. Thanks! |
* chore(python): drop python 3.6 Source-Link: googleapis/synthtool@4f89b13 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c * add api_description to .repo-metadata.json * require python 3.7+ in setup.py * remove python 3.6 sample configs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * trigger CI * add python_requires to setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
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>
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>
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
The text was updated successfully, but these errors were encountered: