Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sapi.h>
- int main(int argc, char* argv[])
- {
- ISpVoice * pVoice = NULL;
- if (FAILED(::CoInitialize(NULL)))
- return FALSE;
- HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
- if( SUCCEEDED( hr ) )
- {
- hr = pVoice->Speak(L"Hello world", 0, NULL);
- pVoice->Release();
- pVoice = NULL;
- }
- ::CoUninitialize();
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement