Class: Google::Apis::SpeechV1::PhraseSet
- Inherits:
-
Object
- Object
- Google::Apis::SpeechV1::PhraseSet
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/speech_v1/classes.rb,
lib/google/apis/speech_v1/representations.rb,
lib/google/apis/speech_v1/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.
-
#kms_key_name ⇒ String
Output only.
-
#kms_key_version_name ⇒ String
Output only.
-
#name ⇒ String
The resource name of the phrase set.
-
#phrases ⇒ Array<Google::Apis::SpeechV1::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.
564 565 566 |
# File 'lib/google/apis/speech_v1/classes.rb', line 564 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 as well as adding phrases both with and
without boost to your requests.
Corresponds to the JSON property boost
535 536 537 |
# File 'lib/google/apis/speech_v1/classes.rb', line 535 def boost @boost end |
#kms_key_name ⇒ String
Output only. The KMS key name with which the content of the PhraseSet is encrypted. The
expected format is projects/project/locations/location/keyRings/key_ring
/cryptoKeys/crypto_key`.
Corresponds to the JSON propertykmsKeyName`
543 544 545 |
# File 'lib/google/apis/speech_v1/classes.rb', line 543 def kms_key_name @kms_key_name end |
#kms_key_version_name ⇒ String
Output only. The KMS key version name with which content of the PhraseSet is
encrypted. The expected format is projects/project/locations/location/
keyRings/key_ring/cryptoKeys/crypto_key/cryptoKeyVersions/
crypto_key_version`.
Corresponds to the JSON propertykmsKeyVersionName`
552 553 554 |
# File 'lib/google/apis/speech_v1/classes.rb', line 552 def kms_key_version_name @kms_key_version_name end |
#name ⇒ String
The resource name of the phrase set.
Corresponds to the JSON property name
557 558 559 |
# File 'lib/google/apis/speech_v1/classes.rb', line 557 def name @name end |
#phrases ⇒ Array<Google::Apis::SpeechV1::Phrase>
A list of word and phrases.
Corresponds to the JSON property phrases
562 563 564 |
# File 'lib/google/apis/speech_v1/classes.rb', line 562 def phrases @phrases end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
569 570 571 572 573 574 575 |
# File 'lib/google/apis/speech_v1/classes.rb', line 569 def update!(**args) @boost = args[:boost] if args.key?(:boost) @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) @kms_key_version_name = args[:kms_key_version_name] if args.key?(:kms_key_version_name) @name = args[:name] if args.key?(:name) @phrases = args[:phrases] if args.key?(:phrases) end |