cordova-plugin-tts
cordova-plugin-tts copied to clipboard
VoiceType Male/Female added
Ability to change voice Male or female.
I've tried in ionic4 with modifying as you say and modifying line in ionic-native-tts file index.d.ts
export interface TTSOptions { /** text to speak */ text: string; /** a string like 'en-US', 'zh-CN', etc */ locale?: string; /** speed rate, 0 ~ 1 */ rate?: number; voiceType?: string; }
but no luck on iOS
@akash-pal i've tried to change the voice on my src/android/TTS.java file, but it does not work. Dou you have any tips on how to do that? I've tried with different voices too, like "pt-br-x-afs#male_3-local", without success tough.
Here is what i did:
Voice voiceobj = new Voice("pt-br-x-afs#male_3-local", Locale.getDefault(), 1, 1, true, null); tts.setVoice(voiceobj); tts.speak(text, TextToSpeech.QUEUE_FLUSH, ttsParams);
I'am using ionic 4. I've already removed and added again ionic cordova platform android.
Thx!