前提・実現したいこと
Python初心者です。Google Cloud APIを用いて音声をテキスト出力しようとしています。
こちらの方のページの解決策を参考にタイトルのエラーを解決しようとしたのですが上手くいきません。
質問するのも初めてで不慣れなので、必要な情報が足りてないなどのご指摘ありましたら遠慮なくお願いいたします。
発生している問題・エラーメッセージ
Traceback (most recent call last): File "transcribe.py", line 43, in <module> transcribe_gcs(args.path) File "transcribe.py", line 22, in transcribe_gcs operation = client.long_running_recognize(config, audio) File "/usr/local/lib/python2.7/dist-packages/google/cloud/speech_v1/gapic/speech_client.py", line 264, in long_running_recognize request, retry=retry, timeout=timeout, metadata=metadata) File "/usr/local/lib/python2.7/dist-packages/google/api_core/gapic_v1/method.py", line 139, in __call__ return wrapped_func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/google/api_core/retry.py", line 260, in retry_wrapped_func on_error=on_error, File "/usr/local/lib/python2.7/dist-packages/google/api_core/retry.py", line 177, in retry_target return target() File "/usr/local/lib/python2.7/dist-packages/google/api_core/timeout.py", line 206, in func_with_timeout return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/google/api_core/grpc_helpers.py", line 56, in error_remapped_callable six.raise_from(exceptions.from_grpc_error(exc), exc) File "/usr/local/lib/python2.7/dist-packages/six.py", line 737, in raise_from raise value google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission
該当のソースコード
python transcribe.py gs://test-speech-3/asano.flac
試したこと
https://qiita.com/knyrc/items/7aab521edfc9bfb06625#8-%E5%AE%9F%E8%A1%8C%E7%B5%90%E6%9E%9C
https://teratail.com/questions/123983
https://qiita.com/hanlio/items/875b91e0d4931a57e86b
https://teratail.com/questions/124652
上記を参照に進めていました。
また、許可らしきものということで、サービスアカウントの編集から「G Suite ドメイン全体の委任を有効にする」にチェックをつけてみましたがやはり上手くいきませんでした。
補足情報(FW/ツールのバージョンなど)
音声ファイルは1.82MBで、Web上で拾ってきたサンプルのWAVファイルを、オンライン上でflacに変換したものを使用しています。
----6月13日追記----
普段使用しているデスクトップ型PCとは別のノートPCから上記の「試したこと」を再実行しましたが、やはりタイトルのエラーで止まってしまいました。
必要となる情報かは不明ですが・・・
また、回答依頼を送っていますが、本当に気が向いたときなどで構いませんので・・・
もしよろしければご協力ください、よろしくお願いいたします。
あなたの回答
tips
プレビュー