Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SpeechWordInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Information for a word recognized by the speech recognizer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2SpeechWordInfo

Returns a new instance of GoogleCloudDialogflowV2SpeechWordInfo.



17334
17335
17336
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 17334

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#confidenceFloat

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

Returns:

  • (Float)


17313
17314
17315
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 17313

def confidence
  @confidence
end

#end_offsetString

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

Returns:

  • (String)


17320
17321
17322
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 17320

def end_offset
  @end_offset
end

#start_offsetString

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

Returns:

  • (String)


17327
17328
17329
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 17327

def start_offset
  @start_offset
end

#wordString

The word this info is for. Corresponds to the JSON property word

Returns:

  • (String)


17332
17333
17334
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 17332

def word
  @word
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17339
17340
17341
17342
17343
17344
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 17339

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