如何将云语音中超过1分钟的音频剪辑转录为文本API?

问题描述 投票:-1回答:2

我的问题是,我尝试使用Google Cloud及其工作转录不到一分钟的音频剪辑,但是当我尝试更多时间时它不起作用。所以我的问题是,如何转录超过一分钟的音频或没有限制?

android google-cloud-platform google-cloud-speech
2个回答
0
投票

来自https://cloud.google.com/speech-to-text/quotas#content

  • 超过1分钟的音频必须使用uri字段来引用Google云端存储中的音频文件。

因此,请在转录前将文件存储在Google存储中。


0
投票

使用同步语音识别Transcribing Short audio file转录短音频文件。如果音频文件超过1分钟,则使用异步语音识别。

考虑来自本文档Transcribing long audio file的这个例子。您可以在Cloud Shell中运行以下示例命令。您只需要在GCS中上传(how to upload objects to GCS)音频文件,然后将其用作输入。

gcloud ml speech recognize-long-running \
'gs://gcs-test-data/vr.flac' \
 --language-code='en-US' --async

gcloud ml speech operations describe [OPERATION_ID]
© www.soinside.com 2019 - 2024. All rights reserved.