Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

ISpRecoResult

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

When to use

Applications typically use the ISpRecoResult interface to retrieve the text of speech recognized by the SR engine (see ISpPhrase::GetText). The ISpRecoResult interface also supports the retrieval of the original audio that the SR engine recognized. The Speech Platform can automatically retain the audio for an application using ISpRecoContext::SetAudioOptions.

To set interest in the SR engine's failed recognitions, an application can call 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. The Speech Platform does not require that an SR engine send a phrase with the false recognition event.

An application can set interest in SR engine hypotheses by calling ISpEventSource::SetInterest with SPEI_HYPOTHESIS. Typically, handling these events is useful only for debugging.

Methods in Vtable Order

ISpRecoResult Methods and Derived Interfaces Description
ISpPhrase Inherits from ISpRecoResult and ISpPhrase 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.