Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PhonemeReachedEventArgs Class

PhonemeReachedEventArgs Class

Returns data from the PhonemeReached event.

Namespace:  System.Speech.Synthesis
Assembly:  System.Speech (in System.Speech.dll)

public class PhonemeReachedEventArgs : PromptEventArgs

The PhonemeReachedEventArgs type exposes the following members.

Public propertyAudioPositionGets the audio position of the phoneme.
Public propertyCancelledGets a value indicating whether an asynchronous operation has been canceled. (Inherited from AsyncCompletedEventArgs.)
Public propertyDurationGets the duration of the phoneme.
Public propertyEmphasisGets the emphasis of the phoneme.
Public propertyErrorGets a value indicating which error occurred during an asynchronous operation. (Inherited from AsyncCompletedEventArgs.)
Public propertyNextPhonemeGets the phoneme following the phoneme associated with the PhonemeReached event.
Public propertyPhonemeThe phoneme associated with the PhonemeReached event.
Public propertyPromptGets the prompt associated with the event. (Inherited from PromptEventArgs.)
Public propertyUserStateGets the unique identifier for the asynchronous task. (Inherited from AsyncCompletedEventArgs.)

Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodRaiseExceptionIfNecessaryRaises a user-supplied exception if an asynchronous operation failed. (Inherited from AsyncCompletedEventArgs.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

A phoneme is a basic component of written language. For more information about phonemes, see PhonemeReached.

The following example is part of a Windows Forms application that writes the information returned by the PhonemeReached event to a text box. The phonemes are characters from the International Phonetic Alphabet (IPA).


The first and last characters returned by PhonemeReachedEventArgs are opening and closing characters that enclose but do not represent phonemes that constitute a word or phrase. This example returns five characters, but only the middle three characters are phonemes that represent the word "theme": one for the "th" sound, one for the "e" sound, and one for the "m" sound .

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Speech.Synthesis;

namespace PhonemeReached
  public partial class Form1 : Form
    public Form1()
      textBox1.Text = "";
    public void button1_Click(object sender, EventArgs e)
      // Initialize a new instance of the SpeechSynthesizer.
      SpeechSynthesizer synth = new SpeechSynthesizer();

      // Configure the audio output. 

      // Register for the PhonemeReached event.
      synth.PhonemeReached += new EventHandler<PhonemeReachedEventArgs>(synth_PhonemeReached);

      // Speak the contents of a string.
    // Write information about each phoneme as it is reached.
    private void synth_PhonemeReached(object sender, PhonemeReachedEventArgs e)

        "  Phoneme reached summary:" + Environment.NewLine +
        "    Phoneme:                 {0}" + Environment.NewLine +  
        "    Audio Position:         {1} mSec" + Environment.NewLine +
        "    Duration:                  {2} mSec" + Environment.NewLine +
        "    Emphasis:                {3}" + Environment.NewLine +
        "    Next Phoneme:         {4}" + Environment.NewLine + Environment.NewLine, 

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft