cordova-plugin-tts icon indicating copy to clipboard operation
cordova-plugin-tts copied to clipboard

VoiceType Male/Female added

Open akash-pal opened this issue 6 years ago • 2 comments

Ability to change voice Male or female.

akash-pal avatar Feb 26 '18 13:02 akash-pal

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

elepetit avatar Jan 04 '19 14:01 elepetit

@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!

rluckez avatar Nov 25 '19 23:11 rluckez