CloudVoice is a Text To Speech (TTS) provider for Microsoft Windows that implements the SAPI-5 speech interface and forwards TTS commands to cloud providers
To implement a SAPI 5 TTS engine, see this sample from the Windows SDK.
The idea is to:
Text-To-Socket engine which is part of the Assistive Webdriver toolkit