# TranslationAudio


```
data class TranslationAudio
```

<br />

*** ** * ** ***

Represents an audio packet for the speech translator.

This class is used to wrap raw audio data along with its `https://developer.android.com/reference/java/util/Locale.html` representing the language of the audio, for sending input audio.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/TranslationAudio#TranslationAudio(java.util.Locale,kotlin.ByteArray)(locale: https://developer.android.com/reference/java/util/Locale.html, audioBytes: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/TranslationAudio#equals(kotlin.Any)(other: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/TranslationAudio#hashCode()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/TranslationAudio#audioBytes()` The raw audio data (PCM 16-bit, 16kHz, mono). |
| `https://developer.android.com/reference/java/util/Locale.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/TranslationAudio#locale()` The language of the audio data. |

## Public constructors

### TranslationAudio

```
TranslationAudio(locale: Locale, audioBytes: ByteArray)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### audioBytes

```
val audioBytes: ByteArray
```

The raw audio data (PCM 16-bit, 16kHz, mono).

### locale

```
val locale: Locale
```

The language of the audio data.