Text to speech not working using ionic native


#1

Hi all,
I am in middle of the application for the text to speech, I used Ionic cordova native text to speech plugin, It works fine when I pass option local:‘en-US’, In same scenario when I pass local:‘te’ for telugu, not working.
Here i s the code snippet. src/pages/home/home.html

Ionic Text To Speech Text Language Russian Telugu Play Text src/pages/home/home.ts

import {Component} from ‘@angular/core’;
import {TextToSpeech} from ‘@ionic-native/text-to-speech’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
text: string;
rate: number;
locale: string;

constructor(private tts: TextToSpeech) {
this.text = ‘Initial text’;
this.rate = 1;
this.locale = ‘en-US’;
}

playText() {
this.tts.speak({
text: this.text,
rate: this.rate / 10,
locale: this.locale
})
.then(() => console.log(‘Success’))
.catch((reason: any) => console.log(reason));
}

}
Please look into it. I want multiple language text to speech.

Thanks.