phrase_sets
Creates, updates, deletes, gets or lists a phrase_sets resource.
Overview
| Name | phrase_sets |
| Type | Resource |
| Id | google.speechv2.phrase_sets |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the PhraseSet. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}. |
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. |
boost | number (float) | 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. Valid boost values are between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests. |
createTime | string (google-datetime) | Output only. Creation time. |
deleteTime | string (google-datetime) | Output only. The time at which this resource was requested for deletion. |
displayName | string | User-settable, human-readable name for the PhraseSet. 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 resource will be purged. |
kmsKeyName | string | Output only. The KMS key name with which the PhraseSet 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 PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}. |
phrases | array | A list of word and phrases. |
reconciling | boolean | Output only. Whether or not this PhraseSet is in the process of being updated. |
state | string | Output only. The PhraseSet lifecycle state. (STATE_UNSPECIFIED, ACTIVE, DELETED) |
uid | string | Output only. System-assigned unique identifier for the PhraseSet. |
updateTime | string (google-datetime) | Output only. The most recent time this resource was modified. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the PhraseSet. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}. |
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. |
boost | number (float) | 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. Valid boost values are between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests. |
createTime | string (google-datetime) | Output only. Creation time. |
deleteTime | string (google-datetime) | Output only. The time at which this resource was requested for deletion. |
displayName | string | User-settable, human-readable name for the PhraseSet. 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 resource will be purged. |
kmsKeyName | string | Output only. The KMS key name with which the PhraseSet 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 PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}. |
phrases | array | A list of word and phrases. |
reconciling | boolean | Output only. Whether or not this PhraseSet is in the process of being updated. |
state | string | Output only. The PhraseSet lifecycle state. (STATE_UNSPECIFIED, ACTIVE, DELETED) |
uid | string | Output only. System-assigned unique identifier for the PhraseSet. |
updateTime | string (google-datetime) | Output only. The most recent time this resource was modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, phraseSetsId | Returns the requested PhraseSet. | |
list | select | projectsId, locationsId | pageToken, showDeleted, pageSize | Lists PhraseSets. |
create | insert | projectsId, locationsId | validateOnly, phraseSetId | Creates a PhraseSet. |
patch | update | projectsId, locationsId, phraseSetsId | updateMask, validateOnly | Updates the PhraseSet. |
delete | delete | projectsId, locationsId, phraseSetsId | allowMissing, validateOnly, etag | Deletes the PhraseSet. |
undelete | exec | projectsId, locationsId, phraseSetsId | Undeletes the PhraseSet. |
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 | |
phraseSetsId | string | |
projectsId | string | |
allowMissing | boolean | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
phraseSetId | string | |
showDeleted | boolean | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- get
- list
Returns the requested PhraseSet.
SELECT
name,
annotations,
boost,
createTime,
deleteTime,
displayName,
etag,
expireTime,
kmsKeyName,
kmsKeyVersionName,
phrases,
reconciling,
state,
uid,
updateTime
FROM google.speechv2.phrase_sets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND phraseSetsId = '{{ phraseSetsId }}' -- required
;
Lists PhraseSets.
SELECT
name,
annotations,
boost,
createTime,
deleteTime,
displayName,
etag,
expireTime,
kmsKeyName,
kmsKeyVersionName,
phrases,
reconciling,
state,
uid,
updateTime
FROM google.speechv2.phrase_sets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND showDeleted = '{{ showDeleted }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a PhraseSet.
INSERT INTO google.speechv2.phrase_sets (
data__displayName,
data__phrases,
data__annotations,
data__boost,
projectsId,
locationsId,
validateOnly,
phraseSetId
)
SELECT
'{{ displayName }}',
'{{ phrases }}',
'{{ annotations }}',
{{ boost }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ validateOnly }}',
'{{ phraseSetId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: phrase_sets
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the phrase_sets resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the phrase_sets resource.
- name: displayName
value: "{{ displayName }}"
description: |
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less.
- name: phrases
description: |
A list of word and phrases.
value:
- value: "{{ value }}"
boost: {{ boost }}
- name: annotations
value: "{{ annotations }}"
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: boost
value: {{ 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. Valid `boost` values are between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.
- name: validateOnly
value: {{ validateOnly }}
- name: phraseSetId
value: "{{ phraseSetId }}"
UPDATE examples
- patch
Updates the PhraseSet.
UPDATE google.speechv2.phrase_sets
SET
data__displayName = '{{ displayName }}',
data__phrases = '{{ phrases }}',
data__annotations = '{{ annotations }}',
data__boost = {{ boost }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND phraseSetsId = '{{ phraseSetsId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes the PhraseSet.
DELETE FROM google.speechv2.phrase_sets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND phraseSetsId = '{{ phraseSetsId }}' --required
AND allowMissing = '{{ allowMissing }}'
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}'
;
Lifecycle Methods
- undelete
Undeletes the PhraseSet.
EXEC google.speechv2.phrase_sets.undelete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@phraseSetsId='{{ phraseSetsId }}' --required
@@json=
'{
"name": "{{ name }}",
"validateOnly": {{ validateOnly }},
"etag": "{{ etag }}"
}'
;