Defined in: types/tts.ts:208
Text to Speech streaming input definition
Streaming mode in T2S is synchronized by passing specific callbacks executed at given moments of the streaming. Actions such as playing the audio should happen within the onNext callback. Callbacks can be both synchronous or asynchronous.
Enables an incrementally expanded input, in other words adding new text chunks with streamInsert() as the streaming is running.
optionalonBegin: () =>void|Promise<void>
Defined in: types/tts.ts:190
Called when streaming begins
void | Promise<void>
TextToSpeechStreamingCallbacks.onBegin
optionalonEnd: () =>void|Promise<void>
Defined in: types/tts.ts:192
Called when streaming ends
void | Promise<void>
TextToSpeechStreamingCallbacks.onEnd
optionalonNext: (audio) =>void|Promise<void>
Defined in: types/tts.ts:191
Called after each audio chunk gets calculated.
Float32Array
void | Promise<void>
TextToSpeechStreamingCallbacks.onNext
optionalspeed:number
Defined in: types/tts.ts:88
optional speed argument - the higher it is, the faster the speech becomes
optionalstopAutomatically:boolean
Defined in: types/tts.ts:210
If true, streaming will stop automatically when the buffer is empty.
optionaltext:string
Defined in: types/tts.ts:87
a text to be spoken