Class: Google::Apis::SpeechV1p1beta1::PhraseSet
- Inherits:
-
Object
- Object
- Google::Apis::SpeechV1p1beta1::PhraseSet
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/speech_v1p1beta1/classes.rb,
generated/google/apis/speech_v1p1beta1/representations.rb,
generated/google/apis/speech_v1p1beta1/representations.rb
Overview
Provides "hints" to the speech recognizer to favor specific words and phrases in the results.
Instance Attribute Summary collapse
-
#boost ⇒ Float
Hint Boost.
-
#name ⇒ String
The resource name of the phrase set.
-
#phrases ⇒ Array<Google::Apis::SpeechV1p1beta1::Phrase>
A list of word and phrases.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PhraseSet
constructor
A new instance of PhraseSet.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PhraseSet
Returns a new instance of PhraseSet.
336 337 338 |
# File 'generated/google/apis/speech_v1p1beta1/classes.rb', line 336 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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 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.
Corresponds to the JSON property boost
324 325 326 |
# File 'generated/google/apis/speech_v1p1beta1/classes.rb', line 324 def boost @boost end |
#name ⇒ String
The resource name of the phrase set.
Corresponds to the JSON property name
329 330 331 |
# File 'generated/google/apis/speech_v1p1beta1/classes.rb', line 329 def name @name end |
#phrases ⇒ Array<Google::Apis::SpeechV1p1beta1::Phrase>
A list of word and phrases.
Corresponds to the JSON property phrases
334 335 336 |
# File 'generated/google/apis/speech_v1p1beta1/classes.rb', line 334 def phrases @phrases end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
341 342 343 344 345 |
# File 'generated/google/apis/speech_v1p1beta1/classes.rb', line 341 def update!(**args) @boost = args[:boost] if args.key?(:boost) @name = args[:name] if args.key?(:name) @phrases = args[:phrases] if args.key?(:phrases) end |