Freigeben über


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

  • Anonymous
    August 01, 2005
    How can I convert Text from a document to MP3 using this process?
  • Anonymous
    August 08, 2005
    If you don't already have Speech SDK installed, you can get it from here:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&DisplayLang=en#filelist


  • Anonymous
    August 31, 2005
    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;

    voice.Speak(text,SpeechVoiceSpeakFlags.SVSFDefault);

    fileStream.Close();