C# Save text to speech to MP3 file

前端 未结 3 767
有刺的猬
有刺的猬 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:43

    There are multiple options such as saving to an existing stream. If you want to create a new WAV file, you can use the SetOutputToWaveFile method.

    reader.SetOutputToWaveFile(@"C:\MyWavFile.wav");
    

提交回复
热议问题