private static void Pronounce(Phrase phrase, bool sync) { var url = GetUrl(phrase); var sound = Storage.GetSoundStream(url); var player = new SoundPlayer(sound); if (sync) { player.PlaySync(); } else { player.Play(); } }
private static string GetUrl(Phrase phrase) { return new YandexSpeechKitCloudUrl { Emotion = phrase.Emotion, Text = phrase.Text }.ToString(); }
public static void Say(Phrase phrase) { Pronounce(phrase, false); }
public static void SaySync(Phrase phrase) { Pronounce(phrase, true); }
public MessageBodyOfWarningForm(Phrase[] messageText, string pathToVideoFile) { this.MessageText = messageText; this.PathToVideoFile = pathToVideoFile; }