What's the best way to get the language of the current voice that the TTS engine will use?
I thought that I'd use something like
ISpObjectToken *pToken = NULL;
HRESULT hResult;
CComPtr<ISpVoice> cpVoice;
hResult = cpVoice.CoCreateInstance( CLSID_SpVoice );
hResult = cpVoice->GetVoice(&pToken);
but I'm not sure how to extract LangId from this to determine the current language. The guides I've seen all seem to address changing the voice. I'd prefer to keep the current voice and then to do something tailored to the voice that the user has already selected for their system.
sphelper.h in the Windows SDK has a helper function
that should do what you want.