Matthew van Eerde's web log
I am a Software Development Engineer in Test working for the Windows Sound team. You can contact me via email: mateer at microsoft dot com
Friend key:28904932216450_59cd9d55374be03d8167d37c8ff4196b
I've known for a while that Microsoft Windows comes with text-to-speech and speech-to-text APIs, which power the Narrator and Speech Recognition features respectively.
This forum post prompted me to mess around with them a little.
I came up with this implementation of a say.exe command which takes a single argument as text, and then uses the ISpVoice text-to-speech API to have the computer speak it aloud.
Source and binaries attached.
Pseudocode:
CoInitialize(nullptr);CoCreateInstance(ISpVoice)pSpVoice->Speak(text);
Usage:
>say.exe "Daisy, Daisy; give me your answer, do."
More information on the Speech APIs available here: http://msdn.microsoft.com/en-us/library/ms723627(v=vs.85).aspx