Creating a speech enabled application

Matt Harrington has provided a great article on writing some code to enable speech.  It even comes with some sample code. Perhaps most robust is how to use text to speech interface to notify a user when a particular system event has occurred. Got your own snippet of speech enabling code? Post it here!

Comments (3)

  1. KingsleyTagbo says:

    How can I convert Text from a document to MP3 using this process?

  2. jaywaltm says:

    Hey Kinglsey, super thanks to Matt Harrington for throwing this code my way. This will allow you to create a wave, but as for MP3, you’ll have work with another library as it’s not supported by Sapi:


    string text = "Hello World";

    SpVoice voice = new SpVoice();

    SpFileStream fileStream = new SpFileStream();

    fileStream.Open(@"c:sample.wav", SpeechStreamFileMode.SSFMCreateForWrite, false);

    voice.AudioOutputStream = fileStream;