Cloud Speech V2 Client - Class PhraseSet (1.7.0)

Reference documentation and code samples for the Cloud Speech V2 Client class PhraseSet.

PhraseSet for biasing in speech recognition. A PhraseSet is used to provide "hints" to the speech recognizer to favor specific words and phrases in the results.

Generated from protobuf message google.cloud.speech.v2.PhraseSet

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The resource name of the PhraseSet. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}.

↳ uid string

Output only. System-assigned unique identifier for the PhraseSet.

↳ phrases array<Google\Cloud\Speech\V2\PhraseSet\Phrase>

A list of word and phrases.

↳ boost 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.

↳ display_name string

User-settable, human-readable name for the PhraseSet. Must be 63 characters or less.

↳ state int

Output only. The PhraseSet lifecycle state.

↳ create_time Google\Protobuf\Timestamp

Output only. Creation time.

↳ update_time Google\Protobuf\Timestamp

Output only. The most recent time this resource was modified.

↳ delete_time Google\Protobuf\Timestamp

Output only. The time at which this resource was requested for deletion.

↳ expire_time Google\Protobuf\Timestamp

Output only. The time at which this resource will be purged.

↳ annotations array|Google\Protobuf\Internal\MapField

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.

↳ 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.

↳ reconciling bool

Output only. Whether or not this PhraseSet is in the process of being updated.

↳ kms_key_name 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}.

↳ kms_key_version_name 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}.

getName

Output only. The resource name of the PhraseSet.

Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
string

setName

Output only. The resource name of the PhraseSet.

Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var string
Returns
Type Description
$this

getUid

Output only. System-assigned unique identifier for the PhraseSet.

Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
string

setUid

Output only. System-assigned unique identifier for the PhraseSet.

Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var string
Returns
Type Description
$this

getPhrases

A list of word and phrases.

Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet.Phrase phrases = 3;

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPhrases

A list of word and phrases.

Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet.Phrase phrases = 3;

Parameter
Name Description
var array<Google\Cloud\Speech\V2\PhraseSet\Phrase>
Returns
Type Description
$this

getBoost

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.

Generated from protobuf field float boost = 4;

Returns
Type Description
float

setBoost

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.

Generated from protobuf field float boost = 4;

Parameter
Name Description
var float
Returns
Type Description
$this

getDisplayName

User-settable, human-readable name for the PhraseSet. Must be 63 characters or less.

Generated from protobuf field string display_name = 5;

Returns
Type Description
string

setDisplayName

User-settable, human-readable name for the PhraseSet. Must be 63 characters or less.

Generated from protobuf field string display_name = 5;

Parameter
Name Description
var string
Returns
Type Description
$this

getState

Output only. The PhraseSet lifecycle state.

Generated from protobuf field .google.cloud.speech.v2.PhraseSet.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

setState

Output only. The PhraseSet lifecycle state.

Generated from protobuf field .google.cloud.speech.v2.PhraseSet.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var int
Returns
Type Description
$this

getCreateTime

Output only. Creation time.

Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Creation time.

Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The most recent time this resource was modified.

Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The most recent time this resource was modified.

Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getDeleteTime

Output only. The time at which this resource was requested for deletion.

Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Google\Protobuf\Timestamp|null

hasDeleteTime

clearDeleteTime

setDeleteTime

Output only. The time at which this resource was requested for deletion.

Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getExpireTime

Output only. The time at which this resource will be purged.

Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Google\Protobuf\Timestamp|null

hasExpireTime

clearExpireTime

setExpireTime

Output only. The time at which this resource will be purged.

Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getAnnotations

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.

Generated from protobuf field map<string, string> annotations = 10;

Returns
Type Description
Google\Protobuf\Internal\MapField

setAnnotations

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.

Generated from protobuf field map<string, string> annotations = 10;

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getEtag

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.

Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
string

setEtag

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.

Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var string
Returns
Type Description
$this

getReconciling

Output only. Whether or not this PhraseSet is in the process of being updated.

Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
bool

setReconciling

Output only. Whether or not this PhraseSet is in the process of being updated.

Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var bool
Returns
Type Description
$this

getKmsKeyName

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}.

Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {

Returns
Type Description
string

setKmsKeyName

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}.

Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {

Parameter
Name Description
var string
Returns
Type Description
$this

getKmsKeyVersionName

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}.

Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {

Returns
Type Description
string

setKmsKeyVersionName

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}.

Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {

Parameter
Name Description
var string
Returns
Type Description
$this