Reference documentation and code samples for the Cloud Speech V1p1beta1 Client class PhraseSet.
Provides "hints" to the speech recognizer to favor specific words and phrases in the results.
Generated from protobuf message google.cloud.speech.v1p1beta1.PhraseSet
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The resource name of the phrase set. |
↳ phrases |
array<Google\Cloud\Speech\V1p1beta1\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. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though |
getName
The resource name of the phrase set.
Generated from protobuf field string name = 1;
Returns | |
---|---|
Type | Description |
string |
setName
The resource name of the phrase set.
Generated from protobuf field string name = 1;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getPhrases
A list of word and phrases.
Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setPhrases
A list of word and phrases.
Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Speech\V1p1beta1\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.
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.
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.
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.
Generated from protobuf field float boost = 4;
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |