C# and google speak
See the question and my original answer on StackOverflowThis is a sample code that does it:
using (WebClient client = new WebClient())
{
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows)");
client.DownloadFile("http://translate.google.com/translate_tts?tl=ar&q=مرحبا العالم", "HelloWorld.wav");
}
It will save a HelloWorld.wav file that contains the phrase behind the q parameter - sorry if it doesn't really mean something in arabic :-)