Reference documentation and code samples for the Cloud Speech V2 Client class SpeechAdaptation.
Provides "hints" to the speech recognizer to favor specific words and phrases in the results. Phrase sets can be specified as an inline resource, or a reference to an existing phrase set resource.
Generated from protobuf message google.cloud.speech.v2.SpeechAdaptation
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ phrase_sets |
array<Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet>
A list of inline or referenced phrase sets. |
↳ custom_classes |
array<Google\Cloud\Speech\V2\CustomClass>
A list of inline custom classes. Existing custom class resources can be referenced directly in a phrase set. |
getPhraseSets
A list of inline or referenced phrase sets.
Generated from protobuf field repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setPhraseSets
A list of inline or referenced phrase sets.
Generated from protobuf field repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet>
|
Returns | |
---|---|
Type | Description |
$this |
getCustomClasses
A list of inline custom classes. Existing custom class resources can be referenced directly in a phrase set.
Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setCustomClasses
A list of inline custom classes. Existing custom class resources can be referenced directly in a phrase set.
Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Speech\V2\CustomClass>
|
Returns | |
---|---|
Type | Description |
$this |