Note

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

Microsoft Speech Platform

SPEAKFLAGS

SPEAKFLAGS is used to indicate the type of content that has been sent to a TTS engine, using ISpVoice::Speak. This function uses SPEAKFLAGS types in a bit-field, and the values should be combined with a bitwise OR.

`

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
<strong>SPF_NLP_SPEAK_PUNC,</strong>

//--- TTS Format
<strong>SPF_PARSE_SSML,</strong>
<strong>SPF_PARSE_AUTODETECT</strong>

//--- Masks
<strong>SPF_NLP_MASK,</strong>
<strong>SPF_PARSE_MASK,</strong>
<strong>SPF_VOICE_MASK,</strong>
<strong>SPF_UNUSED_FLAGS</strong>

} 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 (for example, "This is a sentence." would become "This is a sentence period").

  • SPF_PARSE_SSML
    Force XML parsing As W3C SSML.

  • SPF_PARSE_AUTODETECT
    The TTS XML format is auto-detected. This is the default if none of these TTS XML format values are present in the bit-field.

  • SPF_NLP_MASK
    Not used.

  • SPF_PARSE_MASK
    SPF_PARSE_SAPI|SPF_PARSE_SSML.

  • SPF_VOICE_MASK
    This mask has every flag bit set.

  • SPF_UNUSED_FLAGS
    This mask has every unused bit set.