Copy Text from Clipboard and Play it in Text to Speech Engine

Problem

I need a program that copy selected text from any place on the screen and send it to Text to Speech Engine (TTS) using the current versions of SAPI  (SAPI 4, SAPI5… etc).

The program need to deal with the clipboard, and not to overwrite something that was in the clipboard.  For example, upon calling the program need to backup any values that was in the clipboard and copy the selected text to the TTS engine and restore the previous values that was in the clipboard before the program runs.

The program also need to deal with abbreviation like LTD that for my needs is Long-term depression neurophysiology and not Private company limited by shares or Limited company, the TTS will read it as Long-term depression.

Another thing that I need, is to skip some Text to Speech Engines that I dont like to hear, like Microsoft Mike, and choose one of the other engines randomly.

I wont it to be Free of charge and if can be Open source….

Solution

Using the script language  Auto Hot Key  and a great deal of searching the Forum, especially to this thread the the people there on there code, I write a combination of there code to suitable for my needs.

The code here is Open Source (GPL) and it can be compile to runtime EXE file using the this link.

If you have any improvements that you want to share please write in the comments below… 🙂

So here is the code source and the Binary