Text to MP3 using System.Speech.Synthesis.SpeechSynthesizer
Posted
by Rob
on Stack Overflow
See other posts from Stack Overflow
or by Rob
Published on 2009-12-17T06:55:58Z
Indexed on
2010/06/15
13:52 UTC
Read the original article
Hit count: 626
I am trying to get a text-to-speech to save to an MP3. Currently I have the System.Speech.Synthesis speaking to a WAV file nicely.
With New System.Speech.Synthesis.SpeechSynthesizer
'.SetOutputToWaveFile(pOutputPath) This works fine
.SetOutputToWaveStream(<<Problem bit>>)
.Speak(pTextToSpeak)
.SetOutputToNull()
.Dispose()
End With
Now the first line commented out produces a WAV file which is nice. Currently I am trying to replace that with an MP3 output stream and not having much success.
I have tried the Yeti.MMedia converter but either it isn't going to work or I haven't got it to work successfully. I have to admit here I don't know much about encodings, speeds etc.
So the question I have is, does anyone know of a nice way I can say something like the following:
.SetOutputToWaveStream(New MP3WriteStream(pOutputPath))
and have the SpeechSynthesizer write to the WAV which then gets converted to the MP3 and ends up on the HDD.
© Stack Overflow or respective owner