TextToSpeechOpenWaveOutFile(3dtk)

Name

TextToSpeechOpenWaveOutFile - Initiates wave-file mode, allowing speech samples to be written in wave format into a specified wave file.

Syntax
    MMRESULT TextToSpeechOpenWaveOutFile (LPTTS_HANDLE_T phTTS,
                                         LPSTR pszFileName,
                                         DWORD dwFormat)

Parameters

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

LPSTR pszFileName
    Specifies a pointer to a wave file name.

DWORD dwFormat
    Determines the audio sample format. It can be one of the following constants, which are defined in include files mmsystem.h and ttsapi.h:

Constant | Description
WAVE_FORMAT_1M08
 | Mono 8-bit, 11.025 kHz sample rate
WAVE_FORMAT_1M16
 | Mono 16-bit, 11.025 kHz sample rate
WAVE_FORMAT_08M08
 | Mono 8-bit, mu-law 8 kHz sample rate

Description

This function opens the specified wave file and causes the text-to-speech system to enter the wave-file mode, in which speech samples are written in wave format into the wave file each time TextToSpeechSpeak() is called. The text-to-speech system remains in the wave-file mode until TextToSpeechCloseWaveOutFile() is called.

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

TextToSpeechOpenWaveOutFile() 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 or an illegal wave output format was passed.
MMSYSERR_NOMEM
 | Memory allocation error.
MMSYSERR_ALLOCATED
 | A wave file is already open.
MMSYSERR_ERROR
 | Unable to open the wave file or unable to write to the wave file.
MMSYSERR_INVALHANDLE
 | The text-to-speech handle was invalid.

See Also

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

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