Ejemplo n.º 1
0
        private static SystemVoice[] GetSystemVoices()
        {
            var temp = new List <SystemVoice> {
            };

            foreach (var voice in NSSpeechSynthesizer.AvailableVoices)
            {
                var v = new SystemVoice(voice);
                if (v.LocaleIdentifier == "en_US" && !v.ConstantRateOnly)
                {
                    if (v.Name != "Deranged" && v.Name != "Whisper" && v.Name != "Samantha" && v.Name != "Tom") //other voices that don't work
                    {
                        temp.Add(v);
                    }
                }
            }
            return(temp.ToArray());
        }
Ejemplo n.º 2
0
 public static bool SaveToFile(string text, SystemVoice voice, NSUrl url)
 {
     speech.Voice = voice.Identifier;
     return(speech.StartSpeakingStringtoURL(text, url));
 }
Ejemplo n.º 3
0
 public static void StartSpeaking(string text, SystemVoice voice)
 {
     speech.Voice = voice.Identifier;
     speech.StartSpeakingString(text);
 }