ISpRecoResult

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpRecoResult

The ISpRecoResult interface is used by an application to retrieve information about the SR engine's hypotheses, recognitions, and false recognitions.

The most common use of the ISpRecoResult interface is retrieval of text recognized by the SR engine (see ISpPhrase::GetText). The ISpRecoResult interface also supports the retrieval of the original audio that the SR engine recognized. SAPI can automatically retain the audio for an application using ISpRecoContext::SetAudioOptions.

An application can set interest in SR engine hypotheses by calling ISpEventSource::SetInterest with SPEI_HYPOTHESIS. As each hypothesis event is received, the application can examine the proposed text and update its UI to display dynamic run-time recognition status.

An application can set interest in the SR engine's failed recognitions by calling ISpEventSource::SetInterest with SPEI_FALSE_RECOGNITION. If a false recognition occurs, the application can examine the audio (or even a partial recognition result) to reprocess the recognition or attempt to process the partially recognized text. SAPI does not require that an SR engine send a phrase with the false recognition event.

ISpRecoResult Methods Description
ISpPhrase Inherits from ISpPhrase and those methods are accessible from an ISpRecoResult object.
GetResultTimes Retrieves the time information associated with the result.
GetAlternates Retrieves an array containing alternate phrases.
GetAudio Creates an audio stream for a given number of elements.
SpeakAudio Retrieves and speaks the specified audio.
Serialize Creates a serialized copy of the recognition result object.
ScaleAudio Converts the format of the retained audio to a different audio format.
GetRecoContext Returns the recognition context object that is associated with this result.