Cloud Speech-to-Text V2 API - Class Google::Cloud::Speech::V2::StreamingRecognizeRequest (v1.4.0)

Reference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::StreamingRecognizeRequest.

Request message for the StreamingRecognize method. Multiple StreamingRecognizeRequest messages are sent in one call.

If the Recognizer referenced by recognizer contains a fully specified request configuration then the stream may only contain messages with only audio set.

Otherwise the first message must contain a recognizer and a streaming_config message that together fully specify the request configuration and must not contain audio . All subsequent messages must only have audio set.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#audio

defaudio()->::String
Returns
  • (::String) — Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.

    Note: The following fields are mutually exclusive: audio, streaming_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

#audio=

defaudio=(value)->::String
Parameter
  • value (::String) — Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.

    Note: The following fields are mutually exclusive: audio, streaming_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::String) — Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.

    Note: The following fields are mutually exclusive: audio, streaming_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

#recognizer

defrecognizer()->::String
Returns
  • (::String) — Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

#recognizer=

defrecognizer=(value)->::String
Parameter
  • value (::String) — Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.
Returns
  • (::String) — Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

#streaming_config

defstreaming_config()->::Google::Cloud::Speech::V2::StreamingRecognitionConfig
Returns
  • (::Google::Cloud::Speech::V2::StreamingRecognitionConfig) — StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.

    Note: The following fields are mutually exclusive: streaming_config, audio. If a field in that set is populated, all other fields in the set will automatically be cleared.

#streaming_config=

defstreaming_config=(value)->::Google::Cloud::Speech::V2::StreamingRecognitionConfig
Parameter
  • value (::Google::Cloud::Speech::V2::StreamingRecognitionConfig) — StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.

    Note: The following fields are mutually exclusive: streaming_config, audio. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Speech::V2::StreamingRecognitionConfig) — StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.

    Note: The following fields are mutually exclusive: streaming_config, audio. If a field in that set is populated, all other fields in the set will automatically be cleared.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.