0

How can I switch between 3 languages /3 voices in a xamarin app. I found a lot of samples for android but no one for xamarin

i tried:

  public void Speak(string text)
  {
   Plugin.TextToSpeech.TextToSpeech ttse = new Plugin.TextToSpeech.TextToSpeech();

   CrossLocale localeen;

   localeen.Country = "EN";
   localeen.Language = "en_EN";
   ttse.Speak(text, false, localeen);

}

The text is spoken with an italian voice and not as expected in english.

user1230268
  • 221
  • 2
  • 14
  • First you need to use getAvailableLanguages. Then found the one you want in this collection and use them directly to set the language. Or try what's suggested in this answer comments http://stackoverflow.com/a/6656805/4664754 – yan yankelevich Jan 23 '17 at 09:47
  • ths for that. my mistake was that i used the plugin.texttospeech instead of the android.texttospeech. works perfectly now! – user1230268 Jan 23 '17 at 09:54

0 Answers0