Пример #1
0
        private void Voice_Viseme(int StreamNumber, object StreamPosition, int Duration, SpeechVisemeType NextVisemeId, SpeechVisemeFeature Feature, SpeechVisemeType CurrentVisemeId)
        {
            if (ShowAllEventsCheck.Checked)
            {
                AddEventMessage("Viseme: Duration = " + Duration.ToString() +
                                ", NextVisemeId = " + NextVisemeId.ToString() +
                                ", Feature = " + Feature.ToString() +
                                ", CurrentVisemeId = " + CurrentVisemeId.ToString());
            }

            // Show some mouth animation, though this is not
            // really accurate.
            int[]    visemeMap = { 0, 11, 11, 11, 10, 11, 9, 2, 13, 9, 12, 11, 9, 3, 6, 7, 8, 5, 4, 7, 9, 1 };
            int      index;
            Graphics g = Graphics.FromImage(MouthPicture.Image);

            g.Clear(Color.Transparent);
            g.DrawImage(MicImages.Images[0], new Point(0, 0));
            index = visemeMap[Convert.ToInt32(CurrentVisemeId)];
            g.DrawImage(MicImages.Images[index], new Point(0, 0));
            if (index % 6 == 2)
            {
                g.DrawImage(MicImages.Images[14], new Point(0, 0));
            }
            if (index % 6 == 5)
            {
                g.DrawImage(MicImages.Images[13], new Point(0, 0));
            }
            MouthPicture.Invalidate();
        }
Пример #2
0
 private void Voice_Phoneme(int StreamNumber, object StreamPosition, int Duration, short NextPhoneId, SpeechVisemeFeature Feature, short CurrentPhoneId)
 {
     if (ShowAllEventsCheck.Checked)
     {
         AddEventMessage("Phoneme: Duration = " + Duration.ToString() +
                         ", NextPhoneId = " + NextPhoneId.ToString() +
                         ", CurrentPhoneId = " + CurrentPhoneId.ToString() +
                         ", Feature = " + Feature.ToString());
     }
 }