Class: Google::Cloud::Speech::Result::Word

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/speech/result.rb

Overview

Word-specific information for recognized words. Currently, the only additional information provided is the the start and end time offsets. Available when using the words argument in relevant methods.

Instance Attribute Summary collapse

Instance Attribute Details

#end_timeNumeric (readonly)

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if words was specified. This is an experimental feature and the accuracy of the time offset can vary.

Returns:

  • (Numeric)

    the current value of end_time



105
106
107
# File 'lib/google/cloud/speech/result.rb', line 105

def end_time
  @end_time
end

#start_timeNumeric (readonly)

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if words was specified. This is an experimental feature and the accuracy of the time offset can vary.

Returns:

  • (Numeric)

    the current value of start_time



105
106
107
# File 'lib/google/cloud/speech/result.rb', line 105

def start_time
  @start_time
end

#wordString (readonly) Also known as: to_str

The word corresponding to this set of information.

Returns:

  • (String)

    the current value of word



105
106
107
# File 'lib/google/cloud/speech/result.rb', line 105

def word
  @word
end