Update all json files; make some fixes to make it work at all

This commit is contained in:
Sebastian Thiel
2022-03-08 07:59:31 +08:00
parent d12cd3238e
commit 743a56f4b7
372 changed files with 256017 additions and 32197 deletions

View File

@@ -3,7 +3,7 @@
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "See, edit, configure, and delete your Google Cloud Platform data"
"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
}
}
}
@@ -171,6 +171,318 @@
}
}
},
"projects": {
"resources": {
"locations": {
"resources": {
"customClasses": {
"methods": {
"create": {
"description": "Create a custom class.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses",
"httpMethod": "POST",
"id": "speech.projects.locations.customClasses.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The parent resource where this custom class will be created. Format: `projects/{project}/locations/{location}/customClasses` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/customClasses",
"request": {
"$ref": "CreateCustomClassRequest"
},
"response": {
"$ref": "CustomClass"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"delete": {
"description": "Delete a custom class.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}",
"httpMethod": "DELETE",
"id": "speech.projects.locations.customClasses.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the custom class to delete. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"get": {
"description": "Get a custom class.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}",
"httpMethod": "GET",
"id": "speech.projects.locations.customClasses.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the custom class to retrieve. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "CustomClass"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "List custom classes.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses",
"httpMethod": "GET",
"id": "speech.projects.locations.customClasses.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "The maximum number of custom classes to return. The service may return fewer than this value. If unspecified, at most 50 custom classes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A page token, received from a previous `ListCustomClass` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomClass` must match the call that provided the page token.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The parent, which owns this collection of custom classes. Format: `projects/{project}/locations/{location}/customClasses` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/customClasses",
"response": {
"$ref": "ListCustomClassesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"patch": {
"description": "Update a custom class.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}",
"httpMethod": "PATCH",
"id": "speech.projects.locations.customClasses.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The resource name of the custom class.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "The list of fields to be updated.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "CustomClass"
},
"response": {
"$ref": "CustomClass"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
"phraseSets": {
"methods": {
"create": {
"description": "Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets",
"httpMethod": "POST",
"id": "speech.projects.locations.phraseSets.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}/phraseSets` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/phraseSets",
"request": {
"$ref": "CreatePhraseSetRequest"
},
"response": {
"$ref": "PhraseSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"delete": {
"description": "Delete a phrase set.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}",
"httpMethod": "DELETE",
"id": "speech.projects.locations.phraseSets.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the phrase set to delete. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"get": {
"description": "Get a phrase set.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}",
"httpMethod": "GET",
"id": "speech.projects.locations.phraseSets.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the phrase set to retrieve. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "PhraseSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "List phrase sets.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets",
"httpMethod": "GET",
"id": "speech.projects.locations.phraseSets.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "The maximum number of phrase sets to return. The service may return fewer than this value. If unspecified, at most 50 phrase sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A page token, received from a previous `ListPhraseSet` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPhraseSet` must match the call that provided the page token.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The parent, which owns this collection of phrase set. Format: `projects/{project}/locations/{location}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/phraseSets",
"response": {
"$ref": "ListPhraseSetResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"patch": {
"description": "Update a phrase set.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}",
"httpMethod": "PATCH",
"id": "speech.projects.locations.phraseSets.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The resource name of the phrase set.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "The list of fields to be updated.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "PhraseSet"
},
"response": {
"$ref": "PhraseSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
}
}
},
"speech": {
"methods": {
"longrunningrecognize": {
@@ -212,9 +524,96 @@
}
}
},
"revision": "20210325",
"revision": "20220221",
"rootUrl": "https://speech.googleapis.com/",
"schemas": {
"ClassItem": {
"description": "An item of the class.",
"id": "ClassItem",
"properties": {
"value": {
"description": "The class item's value.",
"type": "string"
}
},
"type": "object"
},
"CreateCustomClassRequest": {
"description": "Message sent by the client for the `CreateCustomClass` method.",
"id": "CreateCustomClassRequest",
"properties": {
"customClass": {
"$ref": "CustomClass",
"description": "Required. The custom class to create."
},
"customClassId": {
"description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should be 4-63 characters, and valid characters are /a-z-/.",
"type": "string"
}
},
"type": "object"
},
"CreatePhraseSetRequest": {
"description": "Message sent by the client for the `CreatePhraseSet` method.",
"id": "CreatePhraseSetRequest",
"properties": {
"phraseSet": {
"$ref": "PhraseSet",
"description": "Required. The phrase set to create."
},
"phraseSetId": {
"description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.",
"type": "string"
}
},
"type": "object"
},
"CustomClass": {
"description": "A set of words or phrases that represents a common concept likely to appear in your audio, for example a list of passenger ship names. CustomClass items can be substituted into placeholders that you set in PhraseSet phrases.",
"id": "CustomClass",
"properties": {
"customClassId": {
"description": "If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive.",
"type": "string"
},
"items": {
"description": "A collection of class items.",
"items": {
"$ref": "ClassItem"
},
"type": "array"
},
"name": {
"description": "The resource name of the custom class.",
"type": "string"
}
},
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
"id": "Empty",
"properties": {},
"type": "object"
},
"ListCustomClassesResponse": {
"description": "Message returned to the client by the `ListCustomClasses` method.",
"id": "ListCustomClassesResponse",
"properties": {
"customClasses": {
"description": "The custom classes.",
"items": {
"$ref": "CustomClass"
},
"type": "array"
},
"nextPageToken": {
"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
"type": "string"
}
},
"type": "object"
},
"ListOperationsResponse": {
"description": "The response message for Operations.ListOperations.",
"id": "ListOperationsResponse",
@@ -233,6 +632,24 @@
},
"type": "object"
},
"ListPhraseSetResponse": {
"description": "Message returned to the client by the `ListPhraseSet` method.",
"id": "ListPhraseSetResponse",
"properties": {
"nextPageToken": {
"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
"type": "string"
},
"phraseSets": {
"description": "The phrase set.",
"items": {
"$ref": "PhraseSet"
},
"type": "array"
}
},
"type": "object"
},
"LongRunningRecognizeMetadata": {
"description": "Describes the progress of a long-running `LongRunningRecognize` call. It is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.",
"id": "LongRunningRecognizeMetadata",
@@ -271,6 +688,10 @@
"config": {
"$ref": "RecognitionConfig",
"description": "Required. Provides information to the recognizer that specifies how to process the request."
},
"outputConfig": {
"$ref": "TranscriptOutputConfig",
"description": "Optional. Specifies an optional destination for the recognition results."
}
},
"type": "object"
@@ -279,12 +700,25 @@
"description": "The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.",
"id": "LongRunningRecognizeResponse",
"properties": {
"outputConfig": {
"$ref": "TranscriptOutputConfig",
"description": "Original output config if present in the request."
},
"outputError": {
"$ref": "Status",
"description": "If the transcript output fails this field contains the relevant error."
},
"results": {
"description": "Sequential list of transcription results corresponding to sequential portions of audio.",
"items": {
"$ref": "SpeechRecognitionResult"
},
"type": "array"
},
"totalBilledTime": {
"description": "When available, billed audio seconds for the corresponding request.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
@@ -324,6 +758,45 @@
},
"type": "object"
},
"Phrase": {
"description": "A phrases containing words and phrase \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also include pre-built or custom classes containing groups of words that represent common concepts that occur in natural language. For example, rather than providing a phrase hint for every month of the year (e.g. \"i was born in january\", \"i was born in febuary\", ...), use the pre-built `$MONTH` class improves the likelihood of correctly transcribing audio that includes months (e.g. \"i was born in $month\"). To refer to pre-built classes, use the class' symbol prepended with `$` e.g. `$MONTH`. To refer to custom classes that were defined inline in the request, set the class's `custom_class_id` to a string unique to all class resources and inline classes. Then use the class' id wrapped in $`{...}` e.g. \"${my-months}\". To refer to custom classes resources, use the class' id wrapped in `${}` (e.g. `${my-months}`). Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.",
"id": "Phrase",
"properties": {
"boost": {
"description": "Hint Boost. Overrides the boost set at the phrase set level. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case. Speech recognition will skip PhraseSets with a boost value of 0.",
"format": "float",
"type": "number"
},
"value": {
"description": "The phrase itself.",
"type": "string"
}
},
"type": "object"
},
"PhraseSet": {
"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.",
"id": "PhraseSet",
"properties": {
"boost": {
"description": "Hint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case. Speech recognition will skip PhraseSets with a boost value of 0.",
"format": "float",
"type": "number"
},
"name": {
"description": "The resource name of the phrase set.",
"type": "string"
},
"phrases": {
"description": "A list of word and phrases.",
"items": {
"$ref": "Phrase"
},
"type": "array"
}
},
"type": "object"
},
"RecognitionAudio": {
"description": "Contains audio data in the encoding specified in the `RecognitionConfig`. Either `content` or `uri` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. See [content limits](https://cloud.google.com/speech-to-text/quotas#content).",
"id": "RecognitionAudio",
@@ -344,6 +817,17 @@
"description": "Provides information to the recognizer that specifies how to process the request.",
"id": "RecognitionConfig",
"properties": {
"adaptation": {
"$ref": "SpeechAdaptation",
"description": "Speech adaptation configuration improves the accuracy of speech recognition. For more information, see the [speech adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) documentation. When speech adaptation is set it supersedes the `speech_contexts` field."
},
"alternativeLanguageCodes": {
"description": "A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, listing possible alternative languages of the supplied audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes. If alternative languages are listed, recognition result will contain recognition in the most likely language detected including the main language_code. The recognition result will include the language tag of the language detected in the audio. Note: This feature is only supported for Voice Command and Voice Search use cases and performance may vary for other use cases (e.g., phone call transcription).",
"items": {
"type": "string"
},
"type": "array"
},
"audioChannelCount": {
"description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16 and FLAC are `1`-`8`. Valid values for OGG_OPUS are '1'-'254'. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.",
"format": "int32",
@@ -361,6 +845,18 @@
"description": "This needs to be set to `true` explicitly and `audio_channel_count` > 1 to get each channel recognized separately. The recognition result will contain a `channel_tag` field to state which channel that result belongs to. If this is not true, we will only recognize the first channel. The request is billed cumulatively for all channels recognized: `audio_channel_count` multiplied by the length of the audio.",
"type": "boolean"
},
"enableSpokenEmojis": {
"description": "The spoken emoji behavior for the call If not set, uses default behavior based on model of choice If 'true', adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If 'false', spoken emojis are not replaced.",
"type": "boolean"
},
"enableSpokenPunctuation": {
"description": "The spoken punctuation behavior for the call If not set, uses default behavior based on model of choice e.g. command_and_search will enable spoken punctuation by default If 'true', replaces spoken punctuation with the corresponding symbols in the request. For example, \"how are you question mark\" becomes \"how are you?\". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If 'false', spoken punctuation is not replaced.",
"type": "boolean"
},
"enableWordConfidence": {
"description": "If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.",
"type": "boolean"
},
"enableWordTimeOffsets": {
"description": "If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.",
"type": "boolean"
@@ -375,7 +871,8 @@
"AMR",
"AMR_WB",
"OGG_OPUS",
"SPEEX_WITH_HEADER_BYTE"
"SPEEX_WITH_HEADER_BYTE",
"WEBM_OPUS"
],
"enumDescriptions": [
"Not specified.",
@@ -385,7 +882,8 @@
"Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.",
"Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.",
"Opus encoded audio frames in Ogg container ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.",
"Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required, `OGG_OPUS` is highly preferred over Speex encoding. The [Speex](https://speex.org/) encoding supported by Cloud Speech API has a header byte in each block, as in MIME type `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. `sample_rate_hertz` must be 16000."
"Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required, `OGG_OPUS` is highly preferred over Speex encoding. The [Speex](https://speex.org/) encoding supported by Cloud Speech API has a header byte in each block, as in MIME type `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. `sample_rate_hertz` must be 16000.",
"Opus encoded audio frames in WebM container ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000."
],
"type": "string"
},
@@ -403,7 +901,7 @@
"description": "Metadata regarding this request."
},
"model": {
"description": "Which model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the RecognitionConfig. *Model* *Description* command_and_search Best for short queries such as voice commands or voice search. phone_call Best for audio that originated from a phone call (typically recorded at an 8khz sampling rate). video Best for audio that originated from from video or includes multiple speakers. Ideally the audio is recorded at a 16khz or greater sampling rate. This is a premium model that costs more than the standard rate. default Best for audio that is not one of the specific audio models. For example, long-form audio. Ideally the audio is high-fidelity, recorded at a 16khz or greater sampling rate. ",
"description": "Which model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the RecognitionConfig. *Model* *Description* command_and_search Best for short queries such as voice commands or voice search. phone_call Best for audio that originated from a phone call (typically recorded at an 8khz sampling rate). video Best for audio that originated from video or includes multiple speakers. Ideally the audio is recorded at a 16khz or greater sampling rate. This is a premium model that costs more than the standard rate. default Best for audio that is not one of the specific audio models. For example, long-form audio. Ideally the audio is high-fidelity, recorded at a 16khz or greater sampling rate. medical_conversation Best for audio that originated from a conversation between a medical provider and patient. medical_dictation Best for audio that originated from dictation notes by a medical provider. ",
"type": "string"
},
"profanityFilter": {
@@ -556,6 +1054,11 @@
"$ref": "SpeechRecognitionResult"
},
"type": "array"
},
"totalBilledTime": {
"description": "When available, billed audio seconds for the corresponding request.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
@@ -587,10 +1090,43 @@
},
"type": "object"
},
"SpeechAdaptation": {
"description": "Speech adaptation configuration.",
"id": "SpeechAdaptation",
"properties": {
"customClasses": {
"description": "A collection of custom classes. To specify the classes inline, leave the class' `name` blank and fill in the rest of its fields, giving it a unique `custom_class_id`. Refer to the inline defined class in phrase hints by its `custom_class_id`.",
"items": {
"$ref": "CustomClass"
},
"type": "array"
},
"phraseSetReferences": {
"description": "A collection of phrase set resource names to use.",
"items": {
"type": "string"
},
"type": "array"
},
"phraseSets": {
"description": "A collection of phrase sets. To specify the hints inline, leave the phrase set's `name` blank and fill in the rest of its fields. Any phrase set can use any custom class.",
"items": {
"$ref": "PhraseSet"
},
"type": "array"
}
},
"type": "object"
},
"SpeechContext": {
"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.",
"id": "SpeechContext",
"properties": {
"boost": {
"description": "Hint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case.",
"format": "float",
"type": "number"
},
"phrases": {
"description": "A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also be set to classes for groups of words that represent common concepts that occur in natural language. For example, rather than providing phrase hints for every month of the year, using the $MONTH class improves the likelihood of correctly transcribing audio that includes months.",
"items": {
@@ -611,7 +1147,7 @@
"type": "number"
},
"transcript": {
"description": "Transcript text representing the words that the user spoke.",
"description": "Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.",
"type": "string"
},
"words": {
@@ -639,6 +1175,16 @@
"description": "For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For audio_channel_count = N, its output values can range from '1' to 'N'.",
"format": "int32",
"type": "integer"
},
"languageCode": {
"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.",
"readOnly": true,
"type": "string"
},
"resultEndTime": {
"description": "Time offset of the end of this result relative to the beginning of the audio.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
@@ -670,10 +1216,26 @@
},
"type": "object"
},
"TranscriptOutputConfig": {
"description": "Specifies an optional destination for the recognition results.",
"id": "TranscriptOutputConfig",
"properties": {
"gcsUri": {
"description": "Specifies a Cloud Storage URI for the recognition results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.",
"type": "string"
}
},
"type": "object"
},
"WordInfo": {
"description": "Word-specific information for recognized words.",
"id": "WordInfo",
"properties": {
"confidence": {
"description": "The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.",
"format": "float",
"type": "number"
},
"endTime": {
"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.",
"format": "google-duration",