Share via


Note

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

Microsoft Speech Platform

SPFEI

SPFEI casts a specified value into a 64-bit type.

For a list of the supported SPEI_ord event types, see SPEVENTENUM

Found in: sapi.idl

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>SPFEI(</strong> <strong> void</strong> *<em>SPEI_ord</em> <strong>);</strong> </pre>

Parameters

  • SPEI_ord
    [in, out] The value to re-cast. The new value is passed back.

Return Values

Macro Description
SPFEI_FLAGCHECK Retrieves reserved flags for the event interest enum. 
SPEI_ALL_EVENTS Retrieves all possible events flags.
SPFEI_ALL_TTS_EVENTS Retrieves all possible text-to-speech (TTS) event flags.
SPFEI_ALL_SR_EVENTS Retrieves all possible speech recognition (SR) event flags.

Remarks

The SPFEI_FLAGCHECK macro retrieves the flags that must always be included in any event interest. The Speech Platform uses the SPFEI_FLAGCHECK macro to help developers avoid mistakes by using event interest related methods (see ISpEventSource::SetInterest and ISpRecoContext::SetVoicePurgeEvent) with the actual enumeration instead of the SPFEI() macro.

Example

Here is an example of the SPFEI macro used to set event interest for speech recognition (SR):

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> hr = g_cpRecoCtxt-&gt;SetInterest(SPFEI(SPEI_RECOGNITION), SPFEI(SPEI_RECOGNITION)); </pre>

Here is an example of the SPFEI_ALL_SR_EVENTS macro used to set SR event interest in all events. Note this is an example and not recommended practice.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> hr = g_cpRecoCtxt-&gt;SetInterest(SPFEI_ALL_SR_EVENTS, SPFEI_ALL_SR_EVENTS); </pre>