TextToSpeechOpenLogFile(3dtk)

Name

TextToSpeechOpenLogFile - Initiates log-file mode, allowing speech samples to be written as text, phonemes, or syllables into a specified log file.

Syntax
    MMRESULT TextToSpeechOpenLogFile (LPTTS_HANDLE_T phTTS,
                                     LPSTR pszFileName,
                                     DWORD dwFLAGS)

Parameters

LPTTS_HANDLE_T phTTS
    Specifies an opened text-to-speech handle.

LPSTR pszFileName
    Specifies a pointer to a NULL-terminated string that specifies the name of the log file to be opened.

DWORD dwFlags
    Specifies the type of output. It can contain one or more of the following constants:

Constant | Description
LOG_TEXT
 | Log text
LOG_PHONEMES
 | Log phonemes
LOG_SYLLABLES
 | Log syllable structure

Description

This function opens the specified log file and causes the text-to-speech system to enter the log-file mode, in which speech samples are written as text, phonemes, or syllables into the log file each time TextToSpeechSpeak() is called. The phonemes and syllables are written using the arpabet alphabet. The text-to-speech system remains in the log-file mode until TextToSpeechCloseLogFile() is called.

If more than one of the dwFlags are passed, the logged output is mixed in an unpredictable fashion. If a log file is already open, this function returns an error. The Log voice-control command also has no effect when a log file is already open.

The startup function must be called to start the text-to-speech system before calling TextToSpeechOpenLogFile().

TextToSpeechOpenLogFile() automatically resumes audio ouput if the text-to-speech system is in a paused state due to a previous TextToSpeechPause() call.

Return Values

This function returns a value of type MMRESULT. The value is zero if the function is successful. The return value is one of the following constants:

Constant | Description
MMSYSERR_NOERROR
 | Normal successful completion (zero).
MMSYSERR_INVALPARAM
 | An invalid parameter was passed.
MMSYSERR_NOMEM
 | Unable to allocate memory.
MMSYSERR_ALLOCATED
 | A phoneme file is already open.
MMSYSERR_ERROR
 | Unable to open the output file.
MMSYSERR_INVALHANDLE
 | The text-to-speech handle was invalid.

See Also

Log-File Mode (DECtalk Software Programmer's Guide)

TextToSpeechCloseLogFile(3dtk), TextToSpeechPause(3dtk), TextToSpeechReset(3dtk), TextToSpeechSpeak(3dtk), TextToSpeechStartup(3dtk), TextToSpeechStartupEx(3dtk)