Greetings i wanna get a function tha i can auto player an array text of TTS plugin this my code:
async readText():Promise{
try{
let content = this.textEpubContent;
for(let i=0; i<= this.textEpubContent.length; i++){
const options = {
text: content[i],
locale: ‘en-EN’,
rate: 1,
}
if(this.speaking){
this.tts.speak({text: ''});
this.speaking = false;
return;
}
this.speaking = true;
await this.tts.speak(options);
}
}
catch(e){
//console.log(e);
}
}
how to can read all text from an array ??