# Cloud Speech V2 Client - Class StreamingRecognitionFeatures (2.5.1)

2.5.1 (latest) 2.5.0 2.4.0 2.3.0 2.2.1 2.1.1 2.0.1 1.20.1 1.19.2 1.18.3 1.16.0 1.15.0 1.14.3 1.13.1 1.12.0 1.11.2 1.10.0 1.9.1 1.8.0 1.7.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`

## 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` 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` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/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. |
| `↳ endpointing_sensitivity` | `int` Optional. Endpointing sensitivity for this stream. |

### getEnableVoiceActivityEvents

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setEnableVoiceActivityEvents

If `true`, 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 field `voice_activity_events` must also be set to true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.StreamingRecognitionFeatures.VoiceActivityTimeout` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEndpointingSensitivity

Optional. Endpointing sensitivity for this stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EndpointingSensitivity](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.StreamingRecognitionFeatures.EndpointingSensitivity). |

### setEndpointingSensitivity

Optional. Endpointing sensitivity for this stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [EndpointingSensitivity](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.StreamingRecognitionFeatures.EndpointingSensitivity). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |