Welcome to Pete Brown's 10rem.net

First time here? If you are a developer or are interested in Microsoft tools and technology, please consider subscribing to the latest posts.

You may also be interested in my blog archives, the articles section, or some of my lab projects such as the C64 emulator written in Silverlight.

(hide this)

Holy Cow! Speech Synthesis is Much Easier These Days

Pete Brown - 10 August 2007

I used to have a very thick tome titled "MAPI, TAPI, SAPI" or some reordering of those acronyms. I recall that SAPI was a bit of a chore to use to get voice synthesis going.

Well, I've been messing with .NET 3.5, and found a .NET 3.0 "System.Speech" namespace after looking at SAPI to read the timestamp on voice mail messages. It's a nice managed equivalent of SAPI. So, what does it take to get your computer to speak? Not much, once you add a reference to System.Speech:

using System.Speech.Synthesis;

...

SpeechSynthesizer synth = new SpeechSynthesizer();

synth.Speak("Today is " + DateTime.Now.ToLongDateString());

That's it. No painful initialization code. No callbacks (unless you want), just a single function call.

The voice that comes with Vista is much nicer than the ones you have available from XP, but it's still workable. Like most examples, this is just the tip of the iceburg. You can do a lot from here.

Enjoy!

(PS, for some other good voices, check out this page. The "David" voice is about as clear as I have heard anywhere.)

   
posted by Pete Brown on Friday, August 10, 2007
filed under:    

1 comment for “Holy Cow! Speech Synthesis is Much Easier These Days”

  1. ronsays:
    The current best text to speech software for your pc is Text Speaker. It has customizable pronunciation, reads anything on your screen, and it even has talking reminders. The bundled voices are well priced and sound very human. Voices are available in English, French, Italian, Spanish, German, and more. Easily converts blogs, email, e-books, and more to MP3 or for listening instantly.
    http://www.deskshare.com/text-to-speech-software.aspx

Comment on this Post

Remember me

1 trackback for “Holy Cow! Speech Synthesis is Much Easier These Days”

  1. POKE 53280,0: Pete Brown's Blogsays:
    Computer voice synthesis has come a very long way since the old robotic voices like we heard on Wargames