SPEAKFLAGS

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

SPEAKFLAGS

SPEAKFLAGS lists the ISpVoice::Speak call also the ISpTTSEngine::Speak call. 

typedef enum SPEAKFLAGS
{
    //--- SpVoice flags
    SPF_DEFAULT,          
    SPF_ASYNC,            
    SPF_PURGEBEFORESPEAK, 
    SPF_IS_FILENAME,      
    SPF_IS_XML,           
    SPF_IS_NOT_XML,       
    SPF_PERSIST_XML,      

    //--- Normalizer flags
    SPF_NLP_SPEAK_PUNC,   

    //--- Masks
    SPF_NLP_MASK,        
    SPF_VOICE_MASK,      
    SPF_UNUSED_FLAGS     
} SPEAKFLAGS;

Elements

SPF_DEFAULT

Specifies that the default settings should be used.  The defaults are:

  • Speak the given text string synchronously
  • Not purge pending speak requests
  • Parse the text as XML only if the first character is a left-angle-bracket (<)
  • Not persist global XML state changes across speak calls
  • Not expand punctuation characters into words.

To override this default, use the other flag values given below.

SPF_ASYNC
Specifies that the Speak call should be asynchronous. That is, it will return immediately after the speak request is queued.
SPF_PURGEBEFORESPEAK
Purges all pending speak requests prior to this speak call.
SPF_IS_FILENAME
The string passed to ISpVoice::Speak is a file name, and the file text should be spoken.
SPF_IS_XML
The input text will be parsed for XML markup.
SPF_IS_NOT_XML
The input text will not be parsed for XML markup.
SPF_PERSIST_XML
Global state changes in the XML markup will persist across speak calls.
SPF_NLP_SPEAK_PUNC
Punctuation characters should be expanded into words (e.g. "This is a sentence." would become "This is a sentence period").
SPF_NLP_MASK
This mask is used to remove the SAPI handled flags before ISpTTSEngine::Speak is called. The only flag which the TTS engine must handle is SPF_NLP_SPEAK_PUNC.
SPF_VOICE_MASK
This mask has every flag bit set.
SPF_UNUSED_FLAGS
This mask has every unused bit set.