Reference documentation and code samples for the Cloud Speech-to-Text V1 API class Google::Cloud::Speech::V1::StreamingRecognitionConfig.
Provides information to the recognizer that specifies how to process the request.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#config
def config() -> ::Google::Cloud::Speech::V1::RecognitionConfig- (::Google::Cloud::Speech::V1::RecognitionConfig) — Required. Provides information to the recognizer that specifies how to process the request.
#config=
def config=(value) -> ::Google::Cloud::Speech::V1::RecognitionConfig- value (::Google::Cloud::Speech::V1::RecognitionConfig) — Required. Provides information to the recognizer that specifies how to process the request.
- (::Google::Cloud::Speech::V1::RecognitionConfig) — Required. Provides information to the recognizer that specifies how to process the request.
#enable_voice_activity_events
def enable_voice_activity_events() -> ::Boolean-
(::Boolean) — If
true, responses with voice activity speech events will be returned as they are detected.
#enable_voice_activity_events=
def enable_voice_activity_events=(value) -> ::Boolean-
value (::Boolean) — If
true, responses with voice activity speech events will be returned as they are detected.
-
(::Boolean) — If
true, responses with voice activity speech events will be returned as they are detected.
#interim_results
def interim_results() -> ::Boolean-
(::Boolean) — If
true, interim results (tentative hypotheses) may be returned as they become available (these interim results are indicated with theis_final=falseflag). Iffalseor omitted, onlyis_final=trueresult(s) are returned.
#interim_results=
def interim_results=(value) -> ::Boolean-
value (::Boolean) — If
true, interim results (tentative hypotheses) may be returned as they become available (these interim results are indicated with theis_final=falseflag). Iffalseor omitted, onlyis_final=trueresult(s) are returned.
-
(::Boolean) — If
true, interim results (tentative hypotheses) may be returned as they become available (these interim results are indicated with theis_final=falseflag). Iffalseor omitted, onlyis_final=trueresult(s) are returned.
#single_utterance
def single_utterance() -> ::Boolean-
(::Boolean) —
If
falseor omitted, the recognizer will perform continuous recognition (continuing to wait for and process audio even if the user pauses speaking) until the client closes the input stream (gRPC API) or until the maximum time limit has been reached. May return multipleStreamingRecognitionResults with theis_finalflag set totrue.If
true, the recognizer will detect a single spoken utterance. When it detects that the user has paused or stopped speaking, it will return anEND_OF_SINGLE_UTTERANCEevent and cease recognition. It will return no more than oneStreamingRecognitionResultwith theis_finalflag set totrue.The
single_utterancefield can only be used with specified models, otherwise an error is thrown. Themodelfield in [RecognitionConfig][] must be set to:command_and_searchphone_callAND additional fielduseEnhanced=true- The
modelfield is left undefined. In this case the API auto-selects a model based on any other parameters that you set inRecognitionConfig.
#single_utterance=
def single_utterance=(value) -> ::Boolean-
value (::Boolean) —
If
falseor omitted, the recognizer will perform continuous recognition (continuing to wait for and process audio even if the user pauses speaking) until the client closes the input stream (gRPC API) or until the maximum time limit has been reached. May return multipleStreamingRecognitionResults with theis_finalflag set totrue.If
true, the recognizer will detect a single spoken utterance. When it detects that the user has paused or stopped speaking, it will return anEND_OF_SINGLE_UTTERANCEevent and cease recognition. It will return no more than oneStreamingRecognitionResultwith theis_finalflag set totrue.The
single_utterancefield can only be used with specified models, otherwise an error is thrown. Themodelfield in [RecognitionConfig][] must be set to:command_and_searchphone_callAND additional fielduseEnhanced=true- The
modelfield is left undefined. In this case the API auto-selects a model based on any other parameters that you set inRecognitionConfig.
-
(::Boolean) —
If
falseor omitted, the recognizer will perform continuous recognition (continuing to wait for and process audio even if the user pauses speaking) until the client closes the input stream (gRPC API) or until the maximum time limit has been reached. May return multipleStreamingRecognitionResults with theis_finalflag set totrue.If
true, the recognizer will detect a single spoken utterance. When it detects that the user has paused or stopped speaking, it will return anEND_OF_SINGLE_UTTERANCEevent and cease recognition. It will return no more than oneStreamingRecognitionResultwith theis_finalflag set totrue.The
single_utterancefield can only be used with specified models, otherwise an error is thrown. Themodelfield in [RecognitionConfig][] must be set to:command_and_searchphone_callAND additional fielduseEnhanced=true- The
modelfield is left undefined. In this case the API auto-selects a model based on any other parameters that you set inRecognitionConfig.
#voice_activity_timeout
def voice_activity_timeout() -> ::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout-
(::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout) — If set, the server will automatically close the stream after the specified
duration has elapsed after the last VOICE_ACTIVITY speech event has been
sent. The field
voice_activity_eventsmust also be set to true.
#voice_activity_timeout=
def voice_activity_timeout=(value) -> ::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout-
value (::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout) — If set, the server will automatically close the stream after the specified
duration has elapsed after the last VOICE_ACTIVITY speech event has been
sent. The field
voice_activity_eventsmust also be set to true.
-
(::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout) — If set, the server will automatically close the stream after the specified
duration has elapsed after the last VOICE_ACTIVITY speech event has been
sent. The field
voice_activity_eventsmust also be set to true.