class Google::Apis::SpeechV2beta1::SpeechRecognitionResult

A speech recognition result corresponding to a portion of the audio.

Attributes

alternatives[RW]

Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer. Corresponds to the JSON property `alternatives` @return [Array<Google::Apis::SpeechV2beta1::SpeechRecognitionAlternative>]

channel_tag[RW]

Output only. For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For ` audio_channel_count` = N, its output values can range from `1` to `N`. Corresponds to the JSON property `channelTag` @return [Fixnum]

language_code[RW]

Output only. The [BCP-47](www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio. Corresponds to the JSON property `languageCode` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/speech_v2beta1/classes.rb, line 242
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/speech_v2beta1/classes.rb, line 247
def update!(**args)
  @alternatives = args[:alternatives] if args.key?(:alternatives)
  @channel_tag = args[:channel_tag] if args.key?(:channel_tag)
  @language_code = args[:language_code] if args.key?(:language_code)
end