RecognizedAudio Class

Represents audio input a recognition engine used to generate candidate phrases result.

Namespace: System.Speech.Recognition
Assembly: System.Speech (in system.speech.dll)

public class RecognizedAudio
/** @attribute SerializableAttribute() */ 
public class RecognizedAudio
public class RecognizedAudio
Not applicable.

Instances of RecognizedAudio are typically obtained from Audio property on an object derived from RecognitionResult and passed by a speech recognition engine to handlers of SpeechHypothesized, SpeechRecognized or SpeechRecognitionRejected events generated by SpeechRecognizer and SpeechRecognitionEngine, as well as SpeechRecognized events generated by Grammar.


Instances of RecognizedAudio obtained by emulated speed recognition are a null reference (Nothing in Visual Basic). For more information on emulated speech recognition, see EmulateRecognize and EmulateRecognizeAsync.

In the example below, an application first checks to see if the recognition operation has been emulated by determining if the RecognizedAudio object received is non a null reference (Nothing in Visual Basic). If the RecognizedAudio object is non-a null reference (Nothing in Visual Basic) information about the recognized audio is written to a Windows.Forms.Label for display.

    if (result != null) { //Clear
    RecognizedAudio resultRecognizedAudio = result.Audio;
    if (resultRecognizedAudio == null) {
        label.Text += String.Format(
            "  Emulated input\n");
    } else {
        label.Text += String.Format(
        "  Candidate Phrase at:       {0} mSec\n" +
        "  Phrase Length:             {1} mSec\n" +
        "  Input State Time:          {2}\n" +
        "  Input Format:              {3}\n",


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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions