UPDATE, i saw that the api was bumped, so i updated and mic-streaming example also fails, so i am using that instead:

I am saying "This is a test for stackoverflow" and then wait for it to time out.

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/cloud-client/transcribe_streaming_mic.py

C:\gcp\python-docs-samples\speech\cloud-client>apitest\Scripts\python transcribe_streaming_mic.py
this is a test for stack overflow
Traceback (most recent call last):
  File "transcribe_streaming_mic.py", line 193, in <module>
    main()
  File "transcribe_streaming_mic.py", line 189, in main
    listen_print_loop(responses)
  File "transcribe_streaming_mic.py", line 128, in listen_print_loop
    for response in responses:
  File "C:\gcp\python-docs-samples\speech\cloud-client\apitest\lib\site-packages\grpc\_channel.py", line 351, in next
    return self._next()
  File "C:\gcp\python-docs-samples\speech\cloud-client\apitest\lib\site-packages\grpc\_channel.py", line 342, in _next
    raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.ABORTED, The operation was aborted.)>

environment:

C:\gcp\python-docs-samples\speech\cloud-client>virtualenv apitest
New python executable in C:\gcp\python-docs-samples\speech\cloud-client\apitest\Scripts\python.exe
Installing setuptools, pip, wheel...done.

C:\gcp\python-docs-samples\speech\cloud-client>apitest\Scripts\pip.exe install -r requirements.txt
Collecting google-cloud-speech==0.29.0 (from -r requirements.txt (line 1))
  Using cached google_cloud_speech-0.29.0-py2.py3-none-any.whl
Collecting google-gax<0.16dev,>=0.15.14 (from google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached google-gax-0.15.14.tar.gz
Collecting google-cloud-core<0.28dev,>=0.27.0 (from google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached google_cloud_core-0.27.1-py2.py3-none-any.whl
Collecting googleapis-common-protos[grpc]<2.0dev,>=1.5.2 (from google-cloud-speech==0.29.0->-r requirements.txt (line 1))
Collecting dill<0.3dev,>=0.2.5 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached dill-0.2.7.1.tar.gz
Collecting future<0.17dev,>=0.16.0 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
Collecting grpcio<2.0dev,>=1.0.2 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached grpcio-1.6.0-cp27-cp27m-win_amd64.whl
Collecting google-auth<2.0dev,>=1.0.0 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached google_auth-1.0.2-py2.py3-none-any.whl
Collecting ply==3.8 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
Collecting protobuf<4.0dev,>=3.0.0 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached protobuf-3.4.0-py2.py3-none-any.whl
Collecting requests<3.0dev,>=2.13.0 (from google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting futures>=3.0.0; python_version < "3.2" (from google-cloud-core<0.28dev,>=0.27.0->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached futures-3.1.1-py2-none-any.whl
Requirement already satisfied: setuptools>=34.0.0 in c:\gcp\python-docs-samples\speech\cloud-client\apitest\lib\site-packages (from google-cloud-core<0.28dev,>=
0.27.0->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
Collecting six>=1.10.0 (from google-cloud-core<0.28dev,>=0.27.0->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting pyreadline>=1.7.1 (from dill<0.3dev,>=0.2.5->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
Collecting enum34>=1.0.4 (from grpcio<2.0dev,>=1.0.2->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting cachetools>=2.0.0 (from google-auth<2.0dev,>=1.0.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached cachetools-2.0.1-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from google-auth<2.0dev,>=1.0.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from google-auth<2.0dev,>=1.0.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached pyasn1_modules-0.1.4-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from google-auth<2.0dev,>=1.0.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached pyasn1-0.3.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests<3.0dev,>=2.13.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests<3.0dev,>=2.13.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0dev,>=2.13.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests<3.0dev,>=2.13.0->google-gax<0.16dev,>=0.15.14->google-cloud-speech==0.29.0->-r requirements.txt (line 1))
  Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Building wheels for collected packages: google-gax, dill
  Running setup.py bdist_wheel for google-gax ... done
  Stored in directory: C:\Users\ael\AppData\Local\pip\Cache\wheels\ec\71\80\0614513d3e846456cc6bbc0603200d7f1adf34f121c137a485
  Running setup.py bdist_wheel for dill ... done
  Stored in directory: C:\Users\ael\AppData\Local\pip\Cache\wheels\e5\88\fe\7e290ce5bb39d531eb9bee5cf254ba1c3e3c7ba3339ce67bee
Successfully built google-gax dill
Installing collected packages: pyreadline, dill, future, six, protobuf, futures, enum34, grpcio, googleapis-common-protos, cachetools, pyasn1, rsa, pyasn1-modul
es, google-auth, ply, urllib3, idna, chardet, certifi, requests, google-gax, google-cloud-core, google-cloud-speech
Successfully installed cachetools-2.0.1 certifi-2017.7.27.1 chardet-3.0.4 dill-0.2.7.1 enum34-1.1.6 future-0.16.0 futures-3.1.1 google-auth-1.0.2 google-cloud-c
ore-0.27.1 google-cloud-speech-0.29.0 google-gax-0.15.14 googleapis-common-protos-1.5.2 grpcio-1.6.0 idna-2.6 ply-3.8 protobuf-3.4.0 pyasn1-0.3.4 pyasn1-modules
-0.1.4 pyreadline-2.1 requests-2.18.4 rsa-3.4.2 six-1.10.0 urllib3-1.22

C:\gcp\python-docs-samples\speech\cloud-client>apitest\Scripts\python transcribe_streaming_mic.py
Traceback (most recent call last):
  File "transcribe_streaming_mic.py", line 37, in <module>
    import pyaudio
ImportError: No module named pyaudio


C:\gcp\python-docs-samples\speech\cloud-client>apitest\Scripts\pip.exe install pyaudio
Collecting pyaudio
  Using cached PyAudio-0.2.11-cp27-cp27m-win_amd64.whl
Installing collected packages: pyaudio
Successfully installed pyaudio-0.2.11
1

There are 1 answers

0
Anders Elton On BEST ANSWER

This was an issue between versions.

doing a fresh install with latest version and updating the code to reflect the new changes in the api fixed this.