# TextToSpeechGetSpeaker

The TextToSpeechGetSpeaker call returns the value of the identifier for the last voice that has spoken.

Syntax | MMRESULT TextToSpeechGetSpeaker | (LPTTS_HANDLE_T phTTS, LPSPEAKER_T lpSpeaker)
Parameters | LPTTS_HANDLE_T phTTS | Specifies a text-to-speech handle.
| LPSPEAKER_T lpSpeaker | Points to a DWORD that returns a speaker value from the following list. These symbols are defined in include file ttsapi.h.
Speaker | Description
PAUL | Default (male) voice
HARRY | Full male voice
FRANK | Aged male voice
DENNIS | Male voice
BETTY | Full female voice
URSULA | Aged female voice
WENDY | Whispering female voice
RITA | Female voice
KIT | Child’s voice
Return Value | This call returns a value of type MMRESULT. The value is zero if the call is successful. The return value is one of the following constants:
Constant | Description
MMSYSERR_NOERROR | Normal successful completion (zero).
MMSYSERR_INVALHANDLE | The text-to-speech handle was invalid.
Comments | Note that even after a call to TextToSpeechSetSpeaker, TextToSpeechGetSpeaker returns the value for the previous speaking voice until the new voice actually has spoken.
See Also | TextToSpeechSetSpeaker