【问题标题】:Limitations for Google Speech to text Model Adaptation ApisGoogle Speech to text Model Adaptation API 的限制
【发布时间】:2021-08-05 06:59:41
【问题描述】:

我的目标是使用 google 模型适配来提高语音到文本的准确性,但是这些 API 在任何地方都没有很好的文档记录。

https://cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/projects.locations.customClasses

我尝试创建一个具有 200000 个值的自定义类。在该计数之上,它会给出有效负载大小的错误,而不是条目计数限制。 我在哪里可以找到 API 的正确信息/详细信息及其限制。

我正在使用 Ruby 库来创建自定义类。

创建自定义类的代码。

cname = "TestClass"
items = 3_00_000.times.map{|e| Google::Cloud::Speech::V1p1beta1::CustomClass::ClassItem.new(value: Faker::Name.name) };
_class = Google::Cloud::Speech::V1p1beta1::CustomClass.new(name: cname, items: items);
request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new({custom_class: _class, parent: "projects/<projectID>/locations/global", custom_class_id: cname})
_klass = client.create_custom_class request

似乎正在使用 10_000_000 值创建/更新以下错误。

Google::Cloud::InvalidArgumentError: 3:Request payload size exceeds the limit: 10485760 bytes.. debug_error_string:{"created":"@1628230030.306827000","description":"Error received from peer ipv4:142.251.42.10:443","file":"src/core/lib/surface/call.cc","file_line":1067,"grpc_message":"Request payload size exceeds the limit: 10485760 bytes.","grpc_status":3}

【问题讨论】:

  • 请提供您的流程概述。您正在使用here 中提到的这种改编?你到底得到了什么错误?您的音频文件在 GCS 中还是在本地计算机上?您使用的是同步、异步还是流式请求?可以在here 找到整体语音转文本配额。
  • 列出任何限制/配额信息here
  • @PjoterS 是的,我正在使用相同的 API 来使用自定义类令牌进行适配。我在问题中添加了错误。
  • @MBHAPhoenix 谢谢,但是该链接是针对语音到文本 api 的,而不是针对模型适配 api。
  • 你能在没有私人信息的情况下分享你的代码/步骤吗?您的请求是从您的机器或 GCS 获取音频文件吗? Request payload size exceeds the limit: 10485760 bytes 建议您的文件为 10MB 以上。您的音频文件有多长,它有多少 MB?如果您使用音频的时间超过 1 分钟,建议您使用 Google Cloud Storage。

标签: ruby google-cloud-platform google-speech-to-text-api


【解决方案1】:

这里是有关 API 的所有公开文档。

https://cloud.google.com/speech/docs/
https://cloud.google.com/speech-to-text/docs/release-notes
https://cloud.google.com/speech-to-text/pricing
https://cloud.google.com/speech-to-text/quotas
https://cloud.google.com/speech-to-text/sla
https://cloud.google.com/speech-to-text/docs/support#troubleshooting
https://cloud.google.com/speech-to-text/docs/best-practices
https://cloud.google.com/speech-to-text/docs/encoding
https://cloud.google.com/speech-to-text/docs/languages
https://cloud.google.com/speech-to-text/docs/apis
https://cloud.google.com/speech-to-text/docs/concepts
https://cloud.google.com/speech-to-text/docs/how-to
https://cloud.google.com/speech/docs/tutorials

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-04
    相关资源
    最近更新 更多