# Cloud Speech V2 Client - Class VoiceActivityTimeout (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 VoiceActivityTimeout.

Events that a timeout can be set on for voice activity.

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

## Namespace

Google \\ Cloud \\ Speech \\ V2 \\ StreamingRecognitionFeatures

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ speech_start_timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Duration to timeout the stream if no speech begins. If this is set and no speech is detected in this duration at the start of the stream, the server will close the stream. |
| `↳ speech_end_timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Duration to timeout the stream after speech ends. If this is set and no speech is detected in this duration after speech was detected, the server will close the stream. |

### getSpeechStartTimeout

Duration to timeout the stream if no speech begins. If this is set and
no speech is detected in this duration at the start of the stream, the
server will close the stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasSpeechStartTimeout

### clearSpeechStartTimeout

### setSpeechStartTimeout

Duration to timeout the stream if no speech begins. If this is set and
no speech is detected in this duration at the start of the stream, the
server will close the stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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

### getSpeechEndTimeout

Duration to timeout the stream after speech ends. If this is set and no
speech is detected in this duration after speech was detected, the server
will close the stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasSpeechEndTimeout

### clearSpeechEndTimeout

### setSpeechEndTimeout

Duration to timeout the stream after speech ends. If this is set and no
speech is detected in this duration after speech was detected, the server
will close the stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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