# Cloud Speech-to-Text V2 API - Class Google::Cloud::Speech::V2::StreamingRecognitionResult (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.16.0 0.15.0 0.14.0 0.13.1 0.12.0 0.11.0 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::StreamingRecognitionResult.

A streaming speech recognition result corresponding to a portion of the audio
that is currently being processed.

## 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/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 from `1` to `N`.

### #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 from `1` to `N`.
**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 from `1` to `N`.

### #is_final

    def is_final() -> ::Boolean

**Returns**

- (::Boolean) --- If `false`, this [StreamingRecognitionResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult "Google::Cloud::Speech::V2::StreamingRecognitionResult (class)") represents an interim result that may change. If `true`, this is the final time the speech service will return this particular [StreamingRecognitionResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult "Google::Cloud::Speech::V2::StreamingRecognitionResult (class)"), the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.

### #is_final=

    def is_final=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If `false`, this [StreamingRecognitionResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult "Google::Cloud::Speech::V2::StreamingRecognitionResult (class)") represents an interim result that may change. If `true`, this is the final time the speech service will return this particular [StreamingRecognitionResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult "Google::Cloud::Speech::V2::StreamingRecognitionResult (class)"), the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.
**Returns**

- (::Boolean) --- If `false`, this [StreamingRecognitionResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult "Google::Cloud::Speech::V2::StreamingRecognitionResult (class)") represents an interim result that may change. If `true`, this is the final time the speech service will return this particular [StreamingRecognitionResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult "Google::Cloud::Speech::V2::StreamingRecognitionResult (class)"), the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.

### #language_code

    def language_code() -> ::String

**Returns**

- (::String) --- Output only. The [BCP-47](https://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.

### #result_end_offset

    def result_end_offset() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Protobuf-Duration)) --- Time offset of the end of this result relative to the beginning of the audio.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Protobuf-Duration)) --- Time offset of the end of this result relative to the beginning of the audio.

### #stability

    def stability() -> ::Float

**Returns**

- (::Float) --- An estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results ([is_final](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult#Google__Cloud__Speech__V2__StreamingRecognitionResult_is_final_instance_ "Google::Cloud::Speech::V2::StreamingRecognitionResult#is_final (method)")=`false`). The default of 0.0 is a sentinel value indicating `stability` was not set.

### #stability=

    def stability=(value) -> ::Float

**Parameter**

- **value** (::Float) --- An estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results ([is_final](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult#Google__Cloud__Speech__V2__StreamingRecognitionResult_is_final_instance_ "Google::Cloud::Speech::V2::StreamingRecognitionResult#is_final (method)")=`false`). The default of 0.0 is a sentinel value indicating `stability` was not set.
**Returns**

- (::Float) --- An estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results ([is_final](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-StreamingRecognitionResult#Google__Cloud__Speech__V2__StreamingRecognitionResult_is_final_instance_ "Google::Cloud::Speech::V2::StreamingRecognitionResult#is_final (method)")=`false`). The default of 0.0 is a sentinel value indicating `stability` was not set.