RecognitionResult.Audio Property

A read-only property containing detailed information about the entire audio input used with the current recognition operation.

Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in microsoft.speech.dll)

Syntax

'Declaration

Property Value

Returns a RecognizedAudio object containing all of a recognition candidate's the audio input.

Remarks

Subsections of a recognition candidate's the audio input can be obtained by calling GetAudioForWordRange.

Example

In the example below, Audio is called on an instance of RecognitionResult and the information displayed.

internal static void DisplayBasicPhraseInfo(Label label, RecognitionResult result, AudioStatus audioStatus) {
  /*
   */
  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",
  resultRecognizedAudio.AudioPosition.TotalMilliseconds,
  resultRecognizedAudio.Duration.TotalMilliseconds,
  resultRecognizedAudio.StartTime.ToShortTimeString(),
  resultRecognizedAudio.Format.EncodingFormat.ToString());
    }
    /*
     */
  }
}

Thread Safety

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

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

RecognitionResult Class
RecognitionResult Members
Microsoft.Speech.Recognition Namespace
RecognitionResult Class
RecognizedAudio
GetAudioForWordRange