Using Speech SDK 5.1 text to Audio

Source: Internet
Author: User


SeppchSDK51.exe Speech synthesis engine
SpeechSDK51LangPack.exe support for Japanese and Simplified Chinese is required for this support.
SpeechSDK51MSM.exe This is required if the engine is to be released as part of the product.
Sp5TTintXP.exe XP under Mike and Mary Voice
Sapi.chm Documentation

1. Installing SpeechSDK51.EXE
2. Install SpeechSDK51LangPack.exe to support Chinese
3. You can find some sample files in the installation folder, the sample file can find a generated Interop.SpeechLib.dll file, of course, you can also generate this file yourself.

A simple code

1. Generate a WAV file, where filename is the generated file name.

 speechvoicespeakflags spflags = Speechvoicespeakflags.svsflagsasync; SpVoice Voice = new spvoice (); Speechstreamfilemode Spfilemode = Speechstreamfilemode.ssfmcreateforwrite; Spfilestream Spfilestream = new spfilestream (); (filename, spfilemode, false); Voice.audiooutputstream = Spfilestream; Voice.speak (text, spflags); Voice.waituntildone (Timeout.infinite); Spfilestream.close (); 
      1. Convert WAV files to MP3
        The procedure to rely on here lame []

        string outfile = "-B--resample 22.05-m m" "+ FileName +" "" + filename.replace (". wav", ". mp3") + "" ";
        System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo ();
        Psi. FileName = dir + "Lame.exe";
        Psi. Arguments = outfile;
        Psi. WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;
        System.Diagnostics.Process p = System.Diagnostics.Process.Start (PSI);
        if (Waitflag)
        p.WaitForExit ();

(go) Use speech SDK 5.1 text to Audio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.