Export (0) Print
Expand All

ISpRecoResult (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3


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 MethodsDescription
ISpPhrase Inherits from ISpPhrase and those methods are accessible from an ISpRecoResult object.
GetResultTimesRetrieves the time information associated with the result.
GetAlternatesRetrieves an array containing alternate phrases.
GetAudioCreates an audio stream for a given number of elements.
SpeakAudioRetrieves and speaks the specified audio.
SerializeCreates a serialized copy of the recognition result object.
ScaleAudioConverts the format of the retained audio to a different audio format.
GetRecoContextReturns the recognition context object that is associated with this result.
© 2014 Microsoft