cordova-plugin-tts icon indicating copy to clipboard operation
cordova-plugin-tts copied to clipboard

TTS works even if the app is minimised or removed from background

Open Nikhil-Daffodil opened this issue 6 years ago • 0 comments

Firstly i found that stop() is not working in this , so after google it i found a hack to call start() with empty string.

But another issue that i face is that TTS doe not stop i close the app or minimise it, it will still continue speaking untill it speak the provided string.

` // To Start TTS startSpeech() { this.isSpeechActive = true; this.tts.speak(this.cardData.description) .then(() => { console.log('Success'); this.isSpeechActive = false; }) .catch((reason: any) => { console.log(reason); this.isSpeechActive = false; }); }

//To Stop TTS stopSpeech() { this.isSpeechActive = false; this.tts.speak('') .then(() => console.log('Success')) .catch((reason: any) => console.log(reason)); }`

Nikhil-Daffodil avatar Aug 30 '19 04:08 Nikhil-Daffodil