Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 使用System.Speech.Synthesis.SpeechSynthesizer将文本转换为MP3_.net_Mp3_Text To Speech_Speechsynthesizer - Fatal编程技术网

.net 使用System.Speech.Synthesis.SpeechSynthesizer将文本转换为MP3

.net 使用System.Speech.Synthesis.SpeechSynthesizer将文本转换为MP3,.net,mp3,text-to-speech,speechsynthesizer,.net,Mp3,Text To Speech,Speechsynthesizer,我正在尝试将文本转换为语音以保存到MP3。 目前我有System.Speech.Synthesis可以很好地与WAV文件对话 With New System.Speech.Synthesis.SpeechSynthesizer '.SetOutputToWaveFile(pOutputPath) This works fine .SetOutputToWaveStream(<<Problem bit>>) .

我正在尝试将文本转换为语音以保存到MP3。 目前我有System.Speech.Synthesis可以很好地与WAV文件对话

    With New System.Speech.Synthesis.SpeechSynthesizer
        '.SetOutputToWaveFile(pOutputPath)    This works fine 
        .SetOutputToWaveStream(<<Problem bit>>)
        .Speak(pTextToSpeak)
        .SetOutputToNull()
        .Dispose()
    End With

让语音合成器写入WAV,然后转换成MP3,最后放在HDD上。

我认为除了使用WAV写入,然后使用LAME MP3编码器(等等)转换外,没有其他方法。

只需摆弄雪人,它确实有效,我在一个相当大的web应用程序上使用了它,它已经无问题运行了大约2年。

首先,让Yeti类提供一个具有适当压缩因子的可写流。然后,使用-告诉TTS引擎有关语音质量的信息。

是的,好的,我会尝试一下,尽管我希望有一个更优雅的解决方案,所以我暂时不讨论它。
.SetOutputToWaveStream(New MP3WriteStream(pOutputPath))