Cloud Speech V2 Client - Class StreamingRecognitionFeatures (1.8.0)

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

Available recognition features specific to streaming recognition requests.

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ enable_voice_activity_events bool

If true, responses with voice activity speech events will be returned as they are detected.

↳ interim_results bool

Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

↳ voice_activity_timeout Google\Cloud\Speech\V2\StreamingRecognitionFeatures\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_events must also be set to true.

getEnableVoiceActivityEvents

If true, responses with voice activity speech events will be returned as they are detected.

Generated from protobuf field bool enable_voice_activity_events = 1;

Returns
TypeDescription
bool

setEnableVoiceActivityEvents

If true, responses with voice activity speech events will be returned as they are detected.

Generated from protobuf field bool enable_voice_activity_events = 1;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getInterimResults

Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

Generated from protobuf field bool interim_results = 2;

Returns
TypeDescription
bool

setInterimResults

Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

Generated from protobuf field bool interim_results = 2;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getVoiceActivityTimeout

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_events must also be set to true.

Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Returns
TypeDescription
Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout|null

hasVoiceActivityTimeout

clearVoiceActivityTimeout

setVoiceActivityTimeout

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_events must also be set to true.

Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Parameter
NameDescription
var Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout
Returns
TypeDescription
$this