recognizers
Creates, updates, deletes, gets or lists a recognizers resource.
Overview
| Name | recognizers |
| Type | Resource |
| Id | google.speechv2.recognizers |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the Recognizer. Format: projects/{project}/locations/{location}/recognizers/{recognizer}. |
annotations | object | Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. |
createTime | string (google-datetime) | Output only. Creation time. |
defaultRecognitionConfig | object | Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the RecognizeRequest.config field. (id: RecognitionConfig) |
deleteTime | string (google-datetime) | Output only. The time at which this Recognizer was requested for deletion. |
displayName | string | User-settable, human-readable name for the Recognizer. Must be 63 characters or less. |
etag | string | Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. |
expireTime | string (google-datetime) | Output only. The time at which this Recognizer will be purged. |
kmsKeyName | string | Output only. The KMS key name with which the Recognizer is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. |
kmsKeyVersionName | string | Output only. The KMS key version name with which the Recognizer is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}. |
languageCodes | array | Optional. This field is now deprecated. Prefer the language_codes field in the RecognitionConfig message. The language of the supplied audio as a BCP-47 language tag. Supported languages for each model are listed in the Table of Supported Models. If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio. When you create or update a Recognizer, these values are stored in normalized BCP-47 form. For example, "en-us" is stored as "en-US". |
model | string | Optional. This field is now deprecated. Prefer the model field in the RecognitionConfig message. Which model to use for recognition requests. Select the model best suited to your domain to get best results. Guidance for choosing which model to use can be found in the Transcription Models Documentation and the models supported in each region can be found in the Table Of Supported Models. |
reconciling | boolean | Output only. Whether or not this Recognizer is in the process of being updated. |
state | string | Output only. The Recognizer lifecycle state. |
uid | string | Output only. System-assigned unique identifier for the Recognizer. |
updateTime | string (google-datetime) | Output only. The most recent time this Recognizer was modified. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the Recognizer. Format: projects/{project}/locations/{location}/recognizers/{recognizer}. |
annotations | object | Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. |
createTime | string (google-datetime) | Output only. Creation time. |
defaultRecognitionConfig | object | Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the RecognizeRequest.config field. (id: RecognitionConfig) |
deleteTime | string (google-datetime) | Output only. The time at which this Recognizer was requested for deletion. |
displayName | string | User-settable, human-readable name for the Recognizer. Must be 63 characters or less. |
etag | string | Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. |
expireTime | string (google-datetime) | Output only. The time at which this Recognizer will be purged. |
kmsKeyName | string | Output only. The KMS key name with which the Recognizer is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. |
kmsKeyVersionName | string | Output only. The KMS key version name with which the Recognizer is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}. |
languageCodes | array | Optional. This field is now deprecated. Prefer the language_codes field in the RecognitionConfig message. The language of the supplied audio as a BCP-47 language tag. Supported languages for each model are listed in the Table of Supported Models. If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio. When you create or update a Recognizer, these values are stored in normalized BCP-47 form. For example, "en-us" is stored as "en-US". |
model | string | Optional. This field is now deprecated. Prefer the model field in the RecognitionConfig message. Which model to use for recognition requests. Select the model best suited to your domain to get best results. Guidance for choosing which model to use can be found in the Transcription Models Documentation and the models supported in each region can be found in the Table Of Supported Models. |
reconciling | boolean | Output only. Whether or not this Recognizer is in the process of being updated. |
state | string | Output only. The Recognizer lifecycle state. |
uid | string | Output only. System-assigned unique identifier for the Recognizer. |
updateTime | string (google-datetime) | Output only. The most recent time this Recognizer was modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, recognizersId | Returns the requested Recognizer. Fails with NOT_FOUND if the requested Recognizer doesn't exist. | |
list | select | projectsId, locationsId | pageSize, pageToken, showDeleted | Lists Recognizers. |
create | insert | projectsId, locationsId | validateOnly, recognizerId | Creates a Recognizer. |
patch | update | projectsId, locationsId, recognizersId | updateMask, validateOnly | Updates the Recognizer. |
delete | delete | projectsId, locationsId, recognizersId | validateOnly, allowMissing, etag | Deletes the Recognizer. |
undelete | exec | projectsId, locationsId, recognizersId | Undeletes the Recognizer. | |
recognize | exec | projectsId, locationsId, recognizersId | Performs synchronous Speech recognition: receive results after all audio has been sent and processed. | |
batch_recognize | exec | projectsId, locationsId, recognizersId | Performs batch asynchronous speech recognition: send a request with N audio files and receive a long running operation that can be polled to see when the transcriptions are finished. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
projectsId | string | |
recognizersId | string | |
allowMissing | boolean | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
recognizerId | string | |
showDeleted | boolean | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- get
- list
Returns the requested Recognizer. Fails with NOT_FOUND if the requested Recognizer doesn't exist.
SELECT
name,
annotations,
createTime,
defaultRecognitionConfig,
deleteTime,
displayName,
etag,
expireTime,
kmsKeyName,
kmsKeyVersionName,
languageCodes,
model,
reconciling,
state,
uid,
updateTime
FROM google.speechv2.recognizers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND recognizersId = '{{ recognizersId }}' -- required
;
Lists Recognizers.
SELECT
name,
annotations,
createTime,
defaultRecognitionConfig,
deleteTime,
displayName,
etag,
expireTime,
kmsKeyName,
kmsKeyVersionName,
languageCodes,
model,
reconciling,
state,
uid,
updateTime
FROM google.speechv2.recognizers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND showDeleted = '{{ showDeleted }}'
;
INSERT examples
- create
- Manifest
Creates a Recognizer.
INSERT INTO google.speechv2.recognizers (
data__displayName,
data__model,
data__languageCodes,
data__defaultRecognitionConfig,
data__annotations,
projectsId,
locationsId,
validateOnly,
recognizerId
)
SELECT
'{{ displayName }}',
'{{ model }}',
'{{ languageCodes }}',
'{{ defaultRecognitionConfig }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ validateOnly }}',
'{{ recognizerId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: recognizers
props:
- name: projectsId
value: string
description: Required parameter for the recognizers resource.
- name: locationsId
value: string
description: Required parameter for the recognizers resource.
- name: displayName
value: string
description: >
User-settable, human-readable name for the Recognizer. Must be 63 characters or less.
- name: model
value: string
description: >
Optional. This field is now deprecated. Prefer the `model` field in the `RecognitionConfig` message. Which model to use for recognition requests. Select the model best suited to your domain to get best results. Guidance for choosing which model to use can be found in the [Transcription Models Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model) and the models supported in each region can be found in the [Table Of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- name: languageCodes
value: array
description: >
Optional. This field is now deprecated. Prefer the `language_codes` field in the `RecognitionConfig` message. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio. When you create or update a Recognizer, these values are stored in normalized BCP-47 form. For example, "en-us" is stored as "en-US".
- name: defaultRecognitionConfig
value: object
description: >
Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the RecognizeRequest.config field.
- name: annotations
value: object
description: >
Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations.
- name: validateOnly
value: boolean
- name: recognizerId
value: string
UPDATE examples
- patch
Updates the Recognizer.
UPDATE google.speechv2.recognizers
SET
data__displayName = '{{ displayName }}',
data__model = '{{ model }}',
data__languageCodes = '{{ languageCodes }}',
data__defaultRecognitionConfig = '{{ defaultRecognitionConfig }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND recognizersId = '{{ recognizersId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes the Recognizer.
DELETE FROM google.speechv2.recognizers
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND recognizersId = '{{ recognizersId }}' --required
AND validateOnly = '{{ validateOnly }}'
AND allowMissing = '{{ allowMissing }}'
AND etag = '{{ etag }}'
;
Lifecycle Methods
- undelete
- recognize
- batch_recognize
Undeletes the Recognizer.
EXEC google.speechv2.recognizers.undelete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@recognizersId='{{ recognizersId }}' --required
@@json=
'{
"name": "{{ name }}",
"validateOnly": {{ validateOnly }},
"etag": "{{ etag }}"
}'
;
Performs synchronous Speech recognition: receive results after all audio has been sent and processed.
EXEC google.speechv2.recognizers.recognize
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@recognizersId='{{ recognizersId }}' --required
@@json=
'{
"config": "{{ config }}",
"configMask": "{{ configMask }}",
"content": "{{ content }}",
"uri": "{{ uri }}"
}'
;
Performs batch asynchronous speech recognition: send a request with N audio files and receive a long running operation that can be polled to see when the transcriptions are finished.
EXEC google.speechv2.recognizers.batch_recognize
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@recognizersId='{{ recognizersId }}' --required
@@json=
'{
"recognizer": "{{ recognizer }}",
"config": "{{ config }}",
"configMask": "{{ configMask }}",
"files": "{{ files }}",
"recognitionOutputConfig": "{{ recognitionOutputConfig }}",
"processingStrategy": "{{ processingStrategy }}"
}'
;