Cloud Speech V2 Client - Class StreamingRecognizeRequest (1.13.1)

Reference documentation and code samples for the Cloud Speech V2 Client class StreamingRecognizeRequest.

Request message for the StreamingRecognize method. Multiple StreamingRecognizeRequest messages are sent. The first message must contain a recognizer and optionally a streaming_config message and must not contain audio . All subsequent messages must contain audio and must not contain a streaming_config message.

Generated from protobuf message google.cloud.speech.v2.StreamingRecognizeRequest

Namespace

Google \ Cloud \ Speech \ V2

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ recognizer
string

Required. Streaming recognition should start with an initial request having a recognizer . Subsequent requests carry the audio data to be recognized. The initial request with configuration can be omitted if the Recognizer being used has a default_recognition_config .

↳ streaming_config
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.

↳ audio
string

Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.

getRecognizer

Required. Streaming recognition should start with an initial request having a recognizer . Subsequent requests carry the audio data to be recognized.

The initial request with configuration can be omitted if the Recognizer being used has a default_recognition_config .

Returns
Type
Description
string

setRecognizer

Required. Streaming recognition should start with an initial request having a recognizer . Subsequent requests carry the audio data to be recognized.

The initial request with configuration can be omitted if the Recognizer being used has a default_recognition_config .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getStreamingConfig

StreamingRecognitionConfig to be used in this recognition attempt.

If provided, it will override the default RecognitionConfig stored in the Recognizer.

Returns
Type
Description

hasStreamingConfig

setStreamingConfig

StreamingRecognitionConfig to be used in this recognition attempt.

If provided, it will override the default RecognitionConfig stored in the Recognizer.

Parameter
Name
Description
Returns
Type
Description
$this

getAudio

Inline audio bytes to be Recognized.

Maximum size for this field is 15 KB per request.

Returns
Type
Description
string

hasAudio

setAudio

Inline audio bytes to be Recognized.

Maximum size for this field is 15 KB per request.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getStreamingRequest

Returns
Type
Description
string
Create a Mobile Website
View Site in Mobile | Classic
Share by: