Frank La Vigne

Fear and Loathing in .NET

MVP Logo
Tablet PC MVP

Social Networks

Subscription Options

Add to Google

Subscribe in Bloglines

My Links


Post Categories

Archives

Image Galleries

Cached @ 9/3/2010 2:55:40 AMControl ASP.skins_marvin3_controls_archivelinks_ascx

GamerTag

Dev Community Events

Blog Stats

Cached @ 9/3/2010 2:55:40 AMControl ASP.skins_marvin3_controls_blogstats_ascx  

News


Blog Roll

Favorite Sites

Gadget Blogs

Tablet PC Links

Cached @ 9/3/2010 2:55:40 AMControl ASP.skins_marvin3_controls_categorydisplay_ascx

Speech Synthesis in WPF

Adding Speech Synthesis to your WPF applications is amazingly easy.

To add speech to any WPF application, you'll need to add a reference in your project to System.Speech.

In your code, add the following using statement:

using System.Speech.Synthesis;

To actually say something, add something like this:

SpeechSynthesizer synthesizer = new SpeechSynthesizer();

synthesizer.SpeakAsync("Welcome to Speech Synthesis.");

There's a lot more to the Speech API than that, but that's enough to get your applications talking to you.  ;)

You can also insert pauses, change the voice, spell out words, and even persist your "script" as SSML, an XML markup language endorsed by the W3C.

I put together a quick demo application to show off some basic concepts.

[Download Demo App]

 

Technorati tags: , , ,

posted on Friday, May 25, 2007 10:27 AM

============ Debug Build ============
Dottext Version: 0.95.2004.102
Machine Name: IIS07902
.NET Version: 2.0.50727.3053
No User
============ Debug Build ============