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 | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ enable_voice_activity_events |
bool
If |
↳ 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 |
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 | |
---|---|
Type | Description |
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 | |
---|---|
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.
Generated from protobuf field bool interim_results = 2;
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.
Generated from protobuf field bool interim_results = 2;
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 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout
|
Returns | |
---|---|
Type | Description |
$this |