Troubleshooting of Google cloud speech to text: Difference between revisions

Jump to navigation Jump to search
Line 80: Line 80:
</pre>
</pre>


Solution: (1) Use the short audio file which shorter than 1 min or (2) Modify the uri from {{kbd | key=<nowiki>speech:recognize</nowiki>}} to {{kbd | key=<nowiki>speech:longrunningrecognize</nowiki>}} for long audio file which longer than 1 min
Solution: (1) For audio file which shorter than 1 min, use the uri: {{kbd | key=<nowiki>speech:recognize</nowiki>}}. (2) For audio file which longer than 1 min. Upload files to [https://console.cloud.google.com/storage/ Google cloud storage] (gcs). Modify the uri from {{kbd | key=<nowiki>speech:recognize</nowiki>}} to {{kbd | key=<nowiki>speech:longrunningrecognize</nowiki>}}.
<pre>
<pre>
$ curl -s -H "Content-Type: application/json" \
$ curl -s -H "Content-Type: application/json" \

Navigation menu