Reference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::SpeechRecognitionResult.
A speech recognition result corresponding to a portion of the audio.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#alternatives
def alternatives() -> ::Array<::Google::Cloud::Speech::V2::SpeechRecognitionAlternative>
Returns
- (::Array<::Google::Cloud::Speech::V2::SpeechRecognitionAlternative>) — May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
#alternatives=
def alternatives=(value) -> ::Array<::Google::Cloud::Speech::V2::SpeechRecognitionAlternative>
Parameter
- value (::Array<::Google::Cloud::Speech::V2::SpeechRecognitionAlternative>) — May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
Returns
- (::Array<::Google::Cloud::Speech::V2::SpeechRecognitionAlternative>) — May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
#channel_tag
def channel_tag() -> ::Integer
Returns
-
(::Integer) — 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 from1
toN
.
#channel_tag=
def channel_tag=(value) -> ::Integer
Parameter
-
value (::Integer) — 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 from1
toN
.
Returns
-
(::Integer) — 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 from1
toN
.
#language_code
def language_code() -> ::String
Returns
- (::String) — Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
#result_end_offset
def result_end_offset() -> ::Google::Protobuf::Duration
Returns
- (::Google::Protobuf::Duration) — Time offset of the end of this result relative to the beginning of the audio.
#result_end_offset=
def result_end_offset=(value) -> ::Google::Protobuf::Duration
Parameter
- value (::Google::Protobuf::Duration) — Time offset of the end of this result relative to the beginning of the audio.
Returns
- (::Google::Protobuf::Duration) — Time offset of the end of this result relative to the beginning of the audio.