Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nikhil-Daffodil opened this issue Aug 30, 2019 · 0 comments
Open

Comments

@Nikhil-Daffodil
Copy link

Nikhil-Daffodil commented Aug 30, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant