C# Save text to speech to MP3 file

前端 未结 3 771
有刺的猬
有刺的猬 2021-02-13 17:20

I am wondering if there is a way to save text to speech data to an mp3 or Wav file format to be played back at a later time?

SpeechSynthesizer reader = new Speec         


        
3条回答
  •  渐次进展
    2021-02-13 17:24

    Often, if something works on a dev workstation but not on a production server, its a permissions issue. two thoughts: Does Lame create temporary files somewhere? If so the IIS process needs write permissions there. When writing the output file, again the IIS process needs permission to write that. ConvertWavStreamToMp3File(ref ms, "mytest.mp3"); "mytest.mp3" will probably need to be a full path, using Server.MapPath()

提交回复
热议问题