Open KITHappyRobot opened 5 years ago
google.api_core.exceptions.ServiceUnavailable: 503 Connect Failed
エラーの内容変わらず.
athome@athome-NUC8i7BEH:~/python-docs-samples/speech/cloud-client$ python transcribe.py resources/commercial_mono.wav
公式のサンプルにあった、既存の音声ファイルを投げつけて認識結果を受け取るプログラムは、以下のようにうまく動作しなかった。 1分ほどなにも出力されない状態が続いたためCtrl-Cで落としたのが以下の出力結果
athome@athome-NUC8i7BEH:~/python-docs-samples/speech/cloud-client$ python transcribe.py resources/commercial_mono.wav
E0126 11:29:01.377795406 5719 http_proxy.cc:62] 'https' scheme not supported in proxy URI
^CKeyboardInterrupt
Exception KeyboardInterrupt in 'grpc._cython.cygrpc._next' ignored
Traceback (most recent call last):
File "transcribe.py", line 96, in <module>
transcribe_file(args.path)
File "transcribe.py", line 50, in transcribe_file
response = client.recognize(config, audio)
File "/usr/local/lib/python2.7/dist-packages/google/cloud/speech_v1/gapic/speech_client.py", line 239, in recognize
request, retry=retry, timeout=timeout, metadata=metadata
File "/usr/local/lib/python2.7/dist-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
return wrapped_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "/usr/local/lib/python2.7/dist-packages/google/api_core/retry.py", line 179, in retry_target
return target()
File "/usr/local/lib/python2.7/dist-packages/google/api_core/timeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
return callable_(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 549, in __call__
wait_for_ready)
File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 538, in _blocking
event = call.next_event()
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 310, in grpc._cython.cygrpc.SegregatedCall.next_event
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 151, in grpc._cython.cygrpc._next_call_event
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 152, in grpc._cython.cygrpc._next_call_event
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 308, in grpc._cython.cygrpc.SegregatedCall.next_event.on_success
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 282, in grpc._cython.cygrpc._process_segregated_call_tag
KeyError: None
関連するgooglのパッケージが古い説
GoogleSpeechAPIが様々なエラーで動かなくなる件での備忘録
pyaudioのアップグレード
プログラム起動から1分?ほど経つと
google.api_core.exceptions.ServiceUnavailable: 503 Connect Failed
録音時間が60秒を超えてくると音声ファイルが大きくなりすぎっていわれてClientが例外吐く仕様になっているので、おそらくそれ
害はなさそう
プログラム起動時に
E0126 09:33:30.047345599 4922 http_proxy.cc:62] 'https' scheme not supported in proxy URI
がでて/usr/local/lib/python2.7/dist-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
がプログラム起動時に出る-https://stackoverflow.com/questions/51283708/python-pip-package-requestsdependencywarning-when-installing-elastic-search-cura
以下の奇妙なエラー吐く。
pipをアンインストールしてから最新版にしても同様のエラー. どうも、aptで入れたpipパッケージをpip自身でアップグレードしようとするとエラー吐くらしい そのため、以下を実行
そして不具合起こしていたパッケージを更新
ちなみにこのパッケージはどうも暗号化に関するものらしい
次なるエラー、
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
エラー全文は以下
以下のように、無事cryptographyからなるエラーは消えた