Interface: TextToSpeechStreamingInput
Defined in: types/tts.ts:176
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.
Extends
Properties
onBegin()?
optionalonBegin: () =>void|Promise<void>
Defined in: types/tts.ts:158
Called when streaming begins
Returns
void | Promise<void>
Inherited from
TextToSpeechStreamingCallbacks.onBegin
onEnd()?
optionalonEnd: () =>void|Promise<void>
Defined in: types/tts.ts:160
Called when streaming ends
Returns
void | Promise<void>
Inherited from
TextToSpeechStreamingCallbacks.onEnd
onNext()?
optionalonNext: (audio) =>void|Promise<void>
Defined in: types/tts.ts:159
Called after each audio chunk gets calculated.
Parameters
audio
Float32Array
Returns
void | Promise<void>
Inherited from
TextToSpeechStreamingCallbacks.onNext
phonemize?
optionalphonemize:boolean
Defined in: types/tts.ts:91
if true (default), the input is treated as text and converted to phonemes. If false, the input should already be in IPA phonemes.
Inherited from
speed?
optionalspeed:number
Defined in: types/tts.ts:90
optional speed argument - the higher it is, the faster the speech becomes
Inherited from
stopAutomatically?
optionalstopAutomatically:boolean
Defined in: types/tts.ts:178
If true, streaming will stop automatically when the buffer is empty.
text?
optionaltext:string
Defined in: types/tts.ts:89
a text to be spoken