Feature required: onEnd
subhankhalid402 opened this issue · 2 comments
subhankhalid402 commented
I have an application in which I have to play another voice only when the current voice is all finished playing currently it is giving interruption error.
I would like to have an event onEnd so that a promise can be returnded
In javascript the speech synthesis provides onEnd feature it will be great if this plugin also supports that feature.
robingenz commented
You already know when the speak(...)
method is finished, because a Promise is returned, which only resolves when the operation is finished:
import { TextToSpeech } from '@capacitor-community/text-to-speech';
const speak = async () => {
await TextToSpeech.speak({
text: 'This is the first sample text.',
lang: 'en-US',
});
await TextToSpeech.speak({
text: 'This is the second sample text.',
lang: 'en-US',
});
};
github-actions commented
It looks like there hasn't been a reply in 30 days, so I'm closing this issue.