Hi,
I tried implementing text to speech functionality by following the ionic native tutorial but I get TypeError: this.TTS.speak is not a function when the function is called. Can some tell me what I am doing wrong please,Thanks
constructor(private TTS: TextToSpeech) {
this.text = 'How are you';
this.locale = 'en-us';
this.rate = 1;
}
speakText = () =>{
this.TTS.speak({
text: this.text,
locale: this.locale,
rate: this.rate,
}).then(() => console.log('Success'))
.catch((reason: any) => console.log(reason));
}