Reference documentation and code samples for the Cloud Speech V2 Client class StreamingRecognitionFeatures.
Available recognition features specific to streaming recognition requests.
Generated from protobuf messagegoogle.cloud.speech.v2.StreamingRecognitionFeatures
Namespace
Google \ Cloud \ Speech \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ enable_voice_activity_events
bool
Iftrue, 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.
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 fieldvoice_activity_eventsmust also be set to true.
getEnableVoiceActivityEvents
Iftrue, responses with voice activity speech events will be returned as
they are detected.
Returns
Type
Description
bool
setEnableVoiceActivityEvents
Iftrue, responses with voice activity speech events will be returned as
they are detected.
Parameter
Name
Description
var
bool
Returns
Type
Description
$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.
Returns
Type
Description
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.
Parameter
Name
Description
var
bool
Returns
Type
Description
$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 fieldvoice_activity_eventsmust also be set to true.
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 fieldvoice_activity_eventsmust also be set to true.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Speech V2 Client - Class StreamingRecognitionFeatures (2.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.1 (latest)](/php/docs/reference/cloud-speech/latest/V2.StreamingRecognitionFeatures)\n- [2.1.0](/php/docs/reference/cloud-speech/2.1.0/V2.StreamingRecognitionFeatures)\n- [2.0.1](/php/docs/reference/cloud-speech/2.0.1/V2.StreamingRecognitionFeatures)\n- [1.20.1](/php/docs/reference/cloud-speech/1.20.1/V2.StreamingRecognitionFeatures)\n- [1.19.2](/php/docs/reference/cloud-speech/1.19.2/V2.StreamingRecognitionFeatures)\n- [1.18.3](/php/docs/reference/cloud-speech/1.18.3/V2.StreamingRecognitionFeatures)\n- [1.16.0](/php/docs/reference/cloud-speech/1.16.0/V2.StreamingRecognitionFeatures)\n- [1.15.0](/php/docs/reference/cloud-speech/1.15.0/V2.StreamingRecognitionFeatures)\n- [1.14.3](/php/docs/reference/cloud-speech/1.14.3/V2.StreamingRecognitionFeatures)\n- [1.13.1](/php/docs/reference/cloud-speech/1.13.1/V2.StreamingRecognitionFeatures)\n- [1.12.0](/php/docs/reference/cloud-speech/1.12.0/V2.StreamingRecognitionFeatures)\n- [1.11.2](/php/docs/reference/cloud-speech/1.11.2/V2.StreamingRecognitionFeatures)\n- [1.10.0](/php/docs/reference/cloud-speech/1.10.0/V2.StreamingRecognitionFeatures)\n- [1.9.1](/php/docs/reference/cloud-speech/1.9.1/V2.StreamingRecognitionFeatures)\n- [1.8.0](/php/docs/reference/cloud-speech/1.8.0/V2.StreamingRecognitionFeatures)\n- [1.7.0](/php/docs/reference/cloud-speech/1.7.0/V2.StreamingRecognitionFeatures) \nReference documentation and code samples for the Cloud Speech V2 Client class StreamingRecognitionFeatures.\n\nAvailable recognition features specific to streaming recognition requests.\n\nGenerated from protobuf message `google.cloud.speech.v2.StreamingRecognitionFeatures`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Speech \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEnableVoiceActivityEvents\n\nIf `true`, responses with voice activity speech events will be returned as\nthey are detected.\n\n### setEnableVoiceActivityEvents\n\nIf `true`, responses with voice activity speech events will be returned as\nthey are detected.\n\n### getInterimResults\n\nWhether or not to stream interim results to the client. If set to true,\ninterim results will be streamed to the client. Otherwise, only the final\nresponse will be streamed back.\n\n### setInterimResults\n\nWhether or not to stream interim results to the client. If set to true,\ninterim results will be streamed to the client. Otherwise, only the final\nresponse will be streamed back.\n\n### getVoiceActivityTimeout\n\nIf set, the server will automatically close the stream after the specified\nduration has elapsed after the last VOICE_ACTIVITY speech event has been\nsent. The field `voice_activity_events` must also be set to true.\n\n### hasVoiceActivityTimeout\n\n### clearVoiceActivityTimeout\n\n### setVoiceActivityTimeout\n\nIf set, the server will automatically close the stream after the specified\nduration has elapsed after the last VOICE_ACTIVITY speech event has been\nsent. The field `voice_activity_events` must also be set to true."]]