Interface: TextToSpeechStreamingInput
Defined in: packages/react-native-executorch/src/types/tts.ts:156
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.
Extends
Properties
onBegin()?
optionalonBegin: () =>void|Promise<void>
Defined in: packages/react-native-executorch/src/types/tts.ts:157
Called when streaming begins
Returns
void | Promise<void>
onEnd()?
optionalonEnd: () =>void|Promise<void>
Defined in: packages/react-native-executorch/src/types/tts.ts:159
Called when streaming ends
Returns
void | Promise<void>
onNext()?
optionalonNext: (audio) =>void|Promise<void>
Defined in: packages/react-native-executorch/src/types/tts.ts:158
Called after each audio chunk gets calculated.
Parameters
audio
Float32Array
Returns
void | Promise<void>
speed?
optionalspeed:number
Defined in: packages/react-native-executorch/src/types/tts.ts:90
optional speed argument - the higher it is, the faster the speech becomes
Inherited from
text
text:
string
Defined in: packages/react-native-executorch/src/types/tts.ts:89
a text to be spoken