1👍
✅
Try wrapping your own promise, that should help
talk: function(message) {
var speakOptions = { ...this.speakoptions, text: message };
return new Promise((resolve, reject) => {
speakOptions.finishedCallback = resolve;
TTS.speak(speakOptions)
});
}
Source:stackexchange.com