IVCmdAttributes::SpeakerGet
This method gets the name of the current speaker for a voice command site.
Syntax
HRESULT SpeakerGet( PTSTR pszSpeaker, DWORD dwSize, DWORD *pdwNeeded);
Parameters
- pszSpeaker
- [in/out] Pointer to a buffer that stores the null-terminated string that contains the name of the current speaker.
- dwSize
- [in] Specifies, in bytes, the size of the buffer specified by pszSpeaker. If the buffer is too small, the member returns an error and fills pdwNeeded with the number of bytes needed to store the speaker string.
- pdwNeeded
- [out] Pointer to a DWORD that receives the number of bytes needed for the speaker string.
Return Values
- NOERROR
- The method successfully retrieved the name of the current speaker.
- E_INVALIDARG
- The argument is invalid.
- VCMDERR_INVALIDMODE
- No site exists, the site does not support this attribute, or the voice command object is already registered with a site.
- VCMDERR_NOTSUPPORTED
- The function is not supported by the engine.
- VCMDERR_OUTOFMEM
- There is no more memory.
- VCMDERR_VALUEOUTOFRANGE
- The value is out of range.
Remarks
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.