区域可用性

在 Speech-to-Text API V2 中,不同区域具有不同的可用性。如需了解可用性,请使用 Locations API。

位置元数据

Locations API 返回的每个位置都有与之关联的元数据,详细说明了可用的语言、模型和模型特征。示例位置及其元数据如下所示。

{
  "locationId": "europe-west1",
  "metadata": {
    "languages": {
      "models": {
        "es-ES": {
          "modelFeatures": {
            "latest_long": {
              "modelFeature": [
                {"feature": "profanity_filter", "releaseState": "GA"},
                {"feature": "spoken_punctuation", "releaseState": "GA"},
                {"feature": "automatic_punctuation", "releaseState": "GA"},
                {"feature": "speaker_diarization", "releaseState": "PREVIEW_DIARIZATION"},
              ]
            }
          }
        }
      }
    }
  }
}

在列表位置中过滤

列出所有可用性时,您可以使用过滤条件。可用于过滤的不同条件如下:

  • language(可选)。所需语言的 BCP-47 语言标记。
  • model(可选)。所需的模型。
  • model_feature(可选)。所需的模型特征。

过滤条件查询示例如下所示。如需进一步参考信息,请参阅过滤条件语法

"language = en-US AND model = latest_long AND model_feature != profanity_filter"