Type Alias: CustomTtsProvider()
A custom text-to-speech callback.
Given a text and voice parameters, the callback must return either an Audio object, or a Fetch API's [Response] object containing the audio data. Both of them can also be wrapped in a Promise.
Parameters
text
string
voice
emotion
string
lang
string
options
{}
speaker
string
speed
number
variation
number
Returns
Examples
application.customTtsProvider = (text) => fetch(`https://example.com/say?text=${text}`);
application.customTtsProvider = (text) => dasha.audio.fromFile(`/path/to/audio/${text}.mp3`);
Found a mistake? Let us know.