# Cloud Speech-to-Text v2 API - Class StreamingRecognitionFeatures.Types.VoiceActivityTimeout (1.8.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.8.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.7.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.6.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.5.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.4.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.3.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.2.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.1.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.0.0/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout)

    public sealed class StreamingRecognitionFeatures.Types.VoiceActivityTimeout : IMessage<StreamingRecognitionFeatures.Types.VoiceActivityTimeout>, IEquatable<StreamingRecognitionFeatures.Types.VoiceActivityTimeout>, IDeepCloneable<StreamingRecognitionFeatures.Types.VoiceActivityTimeout>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Speech-to-Text v2 API class StreamingRecognitionFeatures.Types.VoiceActivityTimeout.

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> StreamingRecognitionFeatures.Types.VoiceActivityTimeout

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[StreamingRecognitionFeatures](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types)[VoiceActivityTimeout](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[StreamingRecognitionFeatures](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types)[VoiceActivityTimeout](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[StreamingRecognitionFeatures](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types)[VoiceActivityTimeout](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Speech.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2)

## Assembly

Google.Cloud.Speech.V2.dll

## Constructors

### VoiceActivityTimeout()

    public VoiceActivityTimeout()

### VoiceActivityTimeout(VoiceActivityTimeout)

    public VoiceActivityTimeout(StreamingRecognitionFeatures.Types.VoiceActivityTimeout other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatureshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.StreamingRecognitionFeatures.Types.VoiceActivityTimeout` |

## Properties

### SpeechEndTimeout

    public Duration SpeechEndTimeout { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### SpeechStartTimeout

    public Duration SpeechStartTimeout { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |