Created
October 24, 2011 05:23
-
-
Save lcapaldo/1308425 to your computer and use it in GitHub Desktop.
Say tool (text to speech on the command line using SAPI)
This file contains hidden or 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
| #include <windows.h> | |
| #include <sapi.h> | |
| int wmain(int argc, wchar_t** argv) | |
| { | |
| ISpVoice *pVoice; | |
| CoInitialize(0); | |
| CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_PPV_ARGS( &pVoice ) ); | |
| pVoice->Speak(argv[1], 0, NULL); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment