Reputation: 2792
I am creating an application which converts text to speech using silverlight 4.0. Two options which I found can be used are:
Are there any other options in which we dont have to provide the elevated permissions?
Upvotes: 1
Views: 394
Reputation: 2792
Another good solution is using google TTS - http://translate.google.com/translate_tts
The code would be like this:
string url = string.Format("http://translate.google.com/translate_tts?tl=en&q={0}", textToSay);
WebClient client = new WebClient();
return client.DownloadData(url);
If using silverlight, the data which is fetched from the above code(in byte array), can be set as the source of media element with converting to memore stream as below:
_audioPlayer.SetSource(new MemoryStream(textToSpeech));
Where textToSpeech is the byte array as returned from google tts.
Upvotes: 0
Reputation: 4257
The Bing translator service has TTS for several languages. Maybe it is possible to just use the TTS part without the translation. This blog post explains how to call the service and perform TTS from Silverlight: http://timheuer.com/blog/archive/2010/03/22/silverlight-translator-text-to-speech-api.aspx
Upvotes: 1