TranslationAudio

public final class TranslationAudio


Represents an audio packet for the speech translator.

This class is used to wrap raw audio data along with its Locale representing the language of the audio, for sending input audio.

Summary

Public constructors

TranslationAudio(@NonNull Locale locale, @NonNull byte[] audioBytes)

Public methods

boolean
equals(Object other)
final @NonNull byte[]

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

final @NonNull Locale

The language of the audio data.

int

Public constructors

TranslationAudio

public TranslationAudio(@NonNull Locale locale, @NonNull byte[] audioBytes)

Public methods

equals

public boolean equals(Object other)

getAudioBytes

public final @NonNull byte[] getAudioBytes()

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

getLocale

public final @NonNull Locale getLocale()

The language of the audio data.

hashCode

public int hashCode()