Skip to main content

recognizers

Creates, updates, deletes, gets or lists a recognizers resource.

Overview

Namerecognizers
TypeResource
Idgoogle.speechv2.recognizers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Identifier. The resource name of the Recognizer. Format: projects/{project}/locations/{location}/recognizers/{recognizer}.
annotationsobjectAllows 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.
createTimestring (google-datetime)Output only. Creation time.
defaultRecognitionConfigobjectDefault configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the RecognizeRequest.config field. (id: RecognitionConfig)
deleteTimestring (google-datetime)Output only. The time at which this Recognizer was requested for deletion.
displayNamestringUser-settable, human-readable name for the Recognizer. Must be 63 characters or less.
etagstringOutput 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.
expireTimestring (google-datetime)Output only. The time at which this Recognizer will be purged.
kmsKeyNamestringOutput 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}.
kmsKeyVersionNamestringOutput 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}.
languageCodesarrayOptional. 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".
modelstringOptional. 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.
reconcilingbooleanOutput only. Whether or not this Recognizer is in the process of being updated.
statestringOutput only. The Recognizer lifecycle state.
uidstringOutput only. System-assigned unique identifier for the Recognizer.
updateTimestring (google-datetime)Output only. The most recent time this Recognizer was modified.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, recognizersIdReturns the requested Recognizer. Fails with NOT_FOUND if the requested Recognizer doesn't exist.
listselectprojectsId, locationsIdpageSize, pageToken, showDeletedLists Recognizers.
createinsertprojectsId, locationsIdvalidateOnly, recognizerIdCreates a Recognizer.
patchupdateprojectsId, locationsId, recognizersIdupdateMask, validateOnlyUpdates the Recognizer.
deletedeleteprojectsId, locationsId, recognizersIdvalidateOnly, allowMissing, etagDeletes the Recognizer.
undeleteexecprojectsId, locationsId, recognizersIdUndeletes the Recognizer.
recognizeexecprojectsId, locationsId, recognizersIdPerforms synchronous Speech recognition: receive results after all audio has been sent and processed.
batch_recognizeexecprojectsId, locationsId, recognizersIdPerforms 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
recognizersIdstring
allowMissingboolean
etagstring
pageSizeinteger (int32)
pageTokenstring
recognizerIdstring
showDeletedboolean
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

Undeletes the Recognizer.

EXEC google.speechv2.recognizers.undelete 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@recognizersId='{{ recognizersId }}' --required
@@json=
'{
"name": "{{ name }}",
"validateOnly": {{ validateOnly }},
"etag": "{{ etag }}"
}'
;