Reputation: 2412
Any silverlight text to speech engine available now? I am looking for very simple text to speech engine which needs to read out numbers.
I dont want to rely on any web service.In worstcase I will record some voices for numbers and stitch them together.
Any pointers are highly appreciated. My application need not work on MAC or linux.
Upvotes: 2
Views: 925
Reputation: 312
Converting text to speech using speech SDK consists of a few simple steps. The following code shows the important pieces in performing text to speech.
dynamic textToSpeech = AutomationFactory.CreateObject("Sapi.SpVoice"); textToSpeech.Volume = book.Volume; textToSpeech.Rate = book.SpeekSpeed; textToSpeech.Voice = book.speeker; textToSpeech.Speak(book.Content);
SpVoice is the class that is used for text to speech conversion. The speak method takes in a string that needs to be spoken.
code sample: http://funducodes.blogspot.com/p/silver-light.html
Upvotes: 2
Reputation: 348
Of course, with all these suggestions, the underlying flaw is in the speech rendering engine itself - every one of these sample results in a nasty clicking at the start of the speech, I'm thinking this is garbage collection on the stream.
Would be nice to finally have something cross platform that can create realistic speech. I am not holding my breath.
Upvotes: 0
Reputation:
There is another option, which doesn't involve ActiveX or Silverlight 4 COM interop. You simply have your Silverlight application send the text to a WCF service which will convert the text to a WAV stream and then decode the stream returned by the service and place it in a MediaStreamSource for playback in Silverlight. I wrote a blog post on it and it includes sample code.
http://www.brianlagunas.com/index.php/2010/03/07/text-to-speech-in-silverlight-using-wcf
Upvotes: 2
Reputation: 57469
You will probably have to build your own for a truely cross compatible application.
Silverlight 3: Use active X to call the Microsoft Speech SDK. (not recommended at all)
Silverlight 4: Use COM integration to call the Microsoft Speech SDK.
These will work on windows only OS.
Upvotes: 1