public static string GetTextToSpeachVoice() { SpeachEventArgs args = new SpeachEventArgs(string.Empty); GetTextVoice?.Invoke(null, args); return(args.Text); }
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>()); }
public static void StopTextToSpeech() { SpeachEventArgs args = new SpeachEventArgs(string.Empty); StopAllSpeach?.Invoke(null, args); }
public static void PlayTextToSpeech(string text) { SpeachEventArgs args = new SpeachEventArgs(text); SpeakText?.Invoke(null, args); }
// Text To Speach public static void SetTextToSpeachVoice(string name) { SpeachEventArgs args = new SpeachEventArgs(name); SetTextVoice?.Invoke(null, args); }