IVCmdAttributes::SpeakerGet

HRESULT SpeakerGet(PTSTR pszSpeaker, DWORD dwSize, DWORD *pdwNeeded);

Retrieves the name of the current speaker for a voice-command site.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
VCMDERR_INVALIDMODE
VCMDERR_NOTSUPPORTED
VCMDERR_OUTOFMEM
VCMDERR_VALUEOUTOFRANGE

pszSpeaker

[in/out] Address of a buffer that receives the name of the current speaker.

dwSize

[in] Size, in bytes, of the buffer specified by pszSpeaker. If the buffer is too small, the function returns an error and fills pdwNeeded with the number of bytes needed to store the speaker string.

pdwNeeded

[out] Address of a variable that receives the number of bytes needed for the speaker string.

Changing the speaker name unloads all training for the previous speaker and loads the training for the new speaker. If no training exists for the new speaker, the application starts with default training.

The speaker name for a site is saved between uses of the site, even if the user shuts down the computer in the meantime.