예제 #1
0
        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();
            }
        }
예제 #2
0
 private static string GetUrl(Phrase phrase)
 {
     return new YandexSpeechKitCloudUrl
     {
         Emotion = phrase.Emotion,
         Text = phrase.Text
     }.ToString();
 }
예제 #3
0
 public static void Say(Phrase phrase)
 {
     Pronounce(phrase, false);
 }
예제 #4
0
 public static void SaySync(Phrase phrase)
 {
     Pronounce(phrase, true);
 }
 public MessageBodyOfWarningForm(Phrase[] messageText, string pathToVideoFile)
 {
     this.MessageText = messageText;
     this.PathToVideoFile = pathToVideoFile;
 }