Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowV2SpeechWordInfo
- Inherits:
-
Object
- Object
- Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowV2SpeechWordInfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dialogflow_v3beta1/classes.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb
Overview
Information for a word recognized by the speech recognizer.
Instance Attribute Summary collapse
-
#confidence ⇒ Float
The Speech confidence between 0.0 and 1.0 for this word.
-
#end_offset ⇒ String
Time offset relative to the beginning of the audio that corresponds to the end of the spoken word.
-
#start_offset ⇒ String
Time offset relative to the beginning of the audio that corresponds to the start of the spoken word.
-
#word ⇒ String
The word this info is for.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDialogflowV2SpeechWordInfo
constructor
A new instance of GoogleCloudDialogflowV2SpeechWordInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDialogflowV2SpeechWordInfo
Returns a new instance of GoogleCloudDialogflowV2SpeechWordInfo.
17732 17733 17734 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 17732 def initialize(**args) update!(**args) end |
Instance Attribute Details
#confidence ⇒ Float
The Speech confidence between 0.0 and 1.0 for this word. A higher number
indicates an estimated greater likelihood that the recognized word is correct.
The default of 0.0 is a sentinel value indicating that confidence was not set.
This field is not guaranteed to be fully stable over time for the same audio
input. Users should also not rely on it to always be provided.
Corresponds to the JSON property confidence
17711 17712 17713 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 17711 def confidence @confidence end |
#end_offset ⇒ String
Time offset relative to the beginning of the audio that corresponds to the end
of the spoken word. This is an experimental feature and the accuracy of the
time offset can vary.
Corresponds to the JSON property endOffset
17718 17719 17720 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 17718 def end_offset @end_offset end |
#start_offset ⇒ String
Time offset relative to the beginning of the audio that corresponds to the
start of the spoken word. This is an experimental feature and the accuracy of
the time offset can vary.
Corresponds to the JSON property startOffset
17725 17726 17727 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 17725 def start_offset @start_offset end |
#word ⇒ String
The word this info is for.
Corresponds to the JSON property word
17730 17731 17732 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 17730 def word @word end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
17737 17738 17739 17740 17741 17742 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 17737 def update!(**args) @confidence = args[:confidence] if args.key?(:confidence) @end_offset = args[:end_offset] if args.key?(:end_offset) @start_offset = args[:start_offset] if args.key?(:start_offset) @word = args[:word] if args.key?(:word) end |