Exemple #1
0
        public static string GetTextToSpeachVoice()
        {
            SpeachEventArgs args = new SpeachEventArgs(string.Empty);

            GetTextVoice?.Invoke(null, args);
            return(args.Text);
        }
Exemple #2
0
        public static List <string> GetTextToSpeachVoices(bool female = true, bool male = true)
        {
            string t = string.Empty;

            if (female)
            {
                t = "female;";
            }
            if (male)
            {
                t += "male;";
            }

            SpeachEventArgs args = new SpeachEventArgs(t);

            GetTextVoiceList?.Invoke(null, args);

            if (!string.IsNullOrEmpty(args.Text))
            {
                return(new List <string>(args.Text.Split(";".ToCharArray())));
            }

            return(new List <string>());
        }
Exemple #3
0
        public static void StopTextToSpeech()
        {
            SpeachEventArgs args = new SpeachEventArgs(string.Empty);

            StopAllSpeach?.Invoke(null, args);
        }
Exemple #4
0
        public static void PlayTextToSpeech(string text)
        {
            SpeachEventArgs args = new SpeachEventArgs(text);

            SpeakText?.Invoke(null, args);
        }
Exemple #5
0
        // Text To Speach
        public static void SetTextToSpeachVoice(string name)
        {
            SpeachEventArgs args = new SpeachEventArgs(name);

            SetTextVoice?.Invoke(null, args);
        }