-
-
Save sherief/61ae2a1e6d17b275833be91be12e54ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma comment(lib, "winmm") | |
#pragma comment(lib, "ole32") | |
#include <sapi.h> | |
void main() | |
{ | |
HRESULT hr; | |
ISpVoice* pVoice; | |
// For TTS | |
::CoInitialize(NULL); | |
pVoice = NULL; | |
::CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice); | |
hr = pVoice->Speak(L"Hello World", SPF_DEFAULT, NULL); | |
pVoice->Release(); | |
::CoUninitialize(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment