text to speech - android TextToSpeech; switching between male and female voices -
i trying app can switch between google's default en-uk male voice (en-gb-x-rjs-phone-hmm) , female voice (en-gb-x-fis-phone-hmm). using 2 text-to-speech objects and, after initializing engine each one, assign corresponding voice each of them setvoice(voice).
mtts1 = new texttospeech(this, oninitlistener, packname); mtts2 = new texttospeech(this, oninitlistener, packname);
and in oninit() method, when both initialized:
mtts1.setvoice(voice1); mtts2.setvoice(voice2);
'voice1' , 'voice2' obtained calling getvoices(), , when voice name, obtain 'en-gb-x-rjs-phone-hmm' , 'en-gb-x-fis-phone-hmm' respectively, make me think voices correctly stored.
when display 2 buttons making them speak, female voice speaks in both cases. think it's fact of default voice. happens having female voice default voice. when set male voice default one, happens opposite.
something should know i'm missing...?
thank all,
Comments
Post a Comment