Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PhonemeReachedEventData"/> class.
 /// </summary>
 /// <param name="e">
 /// The event args from the System.Speech.Synthesis.SpeechSynthesizer.PhonemeReached event.
 /// </param>
 public PhonemeReachedEventData(PhonemeReachedEventArgs e)
 {
     this.Phoneme       = e.Phoneme;
     this.AudioPosition = e.AudioPosition;
     this.Duration      = e.Duration;
     this.Emphasis      = e.Emphasis;
     this.NextPhoneme   = e.NextPhoneme;
 }
Exemplo n.º 2
0
        private void PhonemeReached(PhonemeReachedEventArgs args, List <Phoneme> phonemes)
        {
            var phoneme = new Phoneme
            {
                position = args.AudioPosition,
                phoneme  = args.Phoneme,
                duration = args.Duration,
            };

            phonemes.Add(phoneme);
        }
Exemplo n.º 3
0
        private void OnPhonemeReached(object sender, PhonemeReachedEventArgs e)
        {
            var time = this.pipeline.GetCurrentTime();

            this.PhonemeReached.Post(new PhonemeReachedEventData(e), time);
        }
Exemplo n.º 4
0
 void synthesizer_PhonemeReached(object sender, PhonemeReachedEventArgs e)
 {
     Debug.WriteLine(e.Prompt.ToString() + "\t" + e.Prompt.IsCompleted + "\t" + e.Phoneme);
 }
 private void ProcessPhonem(object sender, PhonemeReachedEventArgs args)
 {
     //Console.WriteLine(args.Phoneme);
 }
Exemplo n.º 6
0
 void _synth_PhonemeReached(object sender, PhonemeReachedEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.ToString());
 }
Exemplo n.º 7
0
 void _synthesizer_PhonemeReached(object sender, PhonemeReachedEventArgs e)
 {
     labelPosition.Text = string.Format("{0}:{1}:{2}.{3}",
         e.AudioPosition.Hours.ToString("00"),
         e.AudioPosition.Minutes.ToString("00"),
         e.AudioPosition.Seconds.ToString("00"),
         e.AudioPosition.Milliseconds.ToString("000"));
 }