收录日期:2019/10/18 22:10:55 时间:2011-08-26 15:50:16 标签:wpf,mp3,wav

I understand that the SpeechSynthesizer (System.Speech.dll) can be used to convert text to speech. I am working on an application that requires the ability of saving the text as mp3 and wav file.

Is this possible using WPF?

I believe that you should be easily able to save to a WAV file via SpeechSynthesizer::SetOutputToWaveFile. I don't think there is built-in support in .NET for converting to MP3, but this should be straightforward with the help of a 3rd party library/utility (like LAME) once you have the audio data as WAV.