示例#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;
 }