Python 在某些音频剪辑上调用Google语音API时出错

Python 在某些音频剪辑上调用Google语音API时出错,python,firebase,google-api,firebase-storage,google-speech-api,Python,Firebase,Google Api,Firebase Storage,Google Speech Api,我一直在为这件事发火:对于一些音频片段,我毫无困难地将它们传递到谷歌语音api,并将它们转换为成绩单,但对于其他音频片段,我反复得到这个神秘的错误消息: RetryError: GaxError(Exception occurred in retry method that was not classified as transient, caused by <_Rendezvous of RPC that terminated with (StatusCode.PERMISSION_DE

我一直在为这件事发火:对于一些音频片段,我毫无困难地将它们传递到谷歌语音api,并将它们转换为成绩单,但对于其他音频片段,我反复得到这个神秘的错误消息:

RetryError: GaxError(Exception occurred in retry method that was not classified as transient, caused by <_Rendezvous of RPC that terminated with (StatusCode.PERMISSION_DENIED, The caller does not have permission)>)
是的,我确实事先运行了
export GOOGLE\u APPLICATION\u CREDENTIALS=path/to/CREDENTIALS.json

我发现其他一些人也遇到了类似的问题

编辑:经过进一步的探索,我注意到错误只发生在4/10/17-4/19/17之间的某个截止点之后上传的音频文件上,尽管在此期间没有更改firebase权限

from google.cloud import speech

speech_client = speech.Client()
audio_sample = speech_client.sample(content=None,source_uri='gs://path/to/firebase/audio.wav',encoding='LINEAR16',sample_rate_hertz=16000)
operation = audio_sample.long_running_recognize('en-US')