# Media Translation v1beta1 API - Class TranslateSpeechConfig (2.0.0-beta06)

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

- [2.0.0-beta06 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/2.0.0-beta05/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/1.0.0-beta03/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig)

    public sealed class TranslateSpeechConfig : IMessage<TranslateSpeechConfig>, IEquatable<TranslateSpeechConfig>, IDeepCloneable<TranslateSpeechConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Media Translation v1beta1 API class TranslateSpeechConfig.

Provides information to the speech translation that specifies how to process
the request.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TranslateSpeechConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TranslateSpeechConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TranslateSpeechConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig), [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.MediaTranslation.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1)

## Assembly

Google.Cloud.MediaTranslation.V1Beta1.dll

## Constructors

### TranslateSpeechConfig()

    public TranslateSpeechConfig()

### TranslateSpeechConfig(TranslateSpeechConfig)

    public TranslateSpeechConfig(TranslateSpeechConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.TranslateSpeechConfig` |

## Properties

### AudioEncoding

    public string AudioEncoding { get; set; }

Required. Encoding of audio data.
Supported formats:

- `linear16`

  Uncompressed 16-bit signed little-endian samples (Linear PCM).
- `flac`

  `flac` (Free Lossless Audio Codec) is the recommended encoding
  because it is lossless--therefore recognition is not compromised--and
  requires only about half the bandwidth of `linear16`.
- `mulaw`

  8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
- `amr`

  Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
- `amr-wb`

  Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
- `ogg-opus`

  Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
  container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
  or 48000.
- `mp3`

  MP3 audio. Support all standard MP3 bitrates (which range from 32-320
  kbps). When using this encoding, `sample_rate_hertz` has to match the
  sample rate of the file being used.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Model

    public string Model { get; set; }

Optional. `google-provided-model/video` and
`google-provided-model/enhanced-phone-call` are premium models.
`google-provided-model/phone-call` is not premium model.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SampleRateHertz

    public int SampleRateHertz { get; set; }

Optional. Sample rate in Hertz of the audio data. Valid values are:
8000-48000. 16000 is optimal. For best results, set the sampling rate of
the audio source to 16000 Hz. If that's not possible, use the native sample
rate of the audio source (instead of re-sampling).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### SourceLanguageCode

    public string SourceLanguageCode { get; set; }

Required. Source language code (BCP-47) of the input audio.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### TargetLanguageCode

    public string TargetLanguageCode { get; set; }

Required. Target language code (BCP-47) of the output.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |