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.
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)); }`