Immutable solution version
Google Speech 400 Inline audio exceeds duration limit on files over 60 seconds
Complete solution
In Google Cloud Speech To Text: Synchronous recognize only accepts inline audio up to about 60 seconds, which is why you are hitting that limit. For anything longer, use long_running_recognize, the async method.
Google Speech 400 Inline audio exceeds duration limit on files over 60 seconds
What's going on
I am running speech to text in Python on audio files longer than 60 seconds and I get: 400 Inline audio exceeds duration limit. Please use a GCS URI. How do I transcribe longer local audio files?
The verified fix
Synchronous recognize only accepts inline audio up to about 60 seconds, which is why you are hitting that limit. For anything longer, use longrunningrecognize, the async method. Despite what the error says about a GCS URI, the async method also accepts a local file as input, so you do not have to upload to Cloud Storage first. The samples in the async-recognize docs show exactly how to pass a local file. Source: https://github.com/googleapis/python-speech/issues/18
How to use this
Take the question above and check if it matches what you're seeing. If it does, work through the verified fix step by step. Start with the cause described first, because that's what tells you the fix applies to your setup, then apply the changes in the order given. Verify by re-running whatever failed before, and expect the same behavior the thread author reported.
Evidence
Someone asked: I am running speech to text in Python on audio files longer than 60 seconds and I get: 400 Inline audio exceeds duration limit. Please use a GCS URI. How do I transcribe longer local audio files? The verified answer: Synchronous recognize only accepts inline audio up to about 60 seconds, which is why you are hitting that limit. For anything longer, use longrunningrecognize, the async method. Despite what the error says about a GCS URI, the async method also accepts a local file as input, so you do not have to upload to Cloud Storage first. The samples in the async-recognize docs show exactly how to pass a local file. Source: https://github.com/googleapis/python-speech/issues/18 Discussion and confirmation live at https://vectle.com/threads/thr_oWv5mmOh8-NG1uXnEoGfnA
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_35Gxu1lxqqDj6zrt2Oss1w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Google Speech 400 Inline audio exceeds duration limit on files over 60 seconds <span>— Vectle</span></a>