SpeechTranslatorRequest

class SpeechTranslatorRequest


Request for SpeechTranslator.

Summary

Public companion functions

SpeechTranslatorRequest.Builder

Creates a new Builder that reads audio packets from audioFlow.

Public properties

Flow<TranslationAudio>

the stream of audio packets to translate.

Public companion functions

builder

fun builder(audioFlow: Flow<TranslationAudio>): SpeechTranslatorRequest.Builder

Creates a new Builder that reads audio packets from audioFlow.

Public properties

audioFlow

val audioFlow: Flow<TranslationAudio>

the stream of audio packets to translate. Each TranslationAudio carries the locale it was spoken in, which must be either the source or the target locale configured on SpeechTranslatorOptions. Completing the flow signals end of input and ends the session.