SOLVED
Richard Nicholas posted on Thursday, October 15, 2009 6:12 PM
I resolved this by manually creating the RIFF header - see this article for details regarding the header requirements:
http://www.codeproject.com/KB/audio-video/MP3Compressor.aspx?fid=32144&fr=1&df=90&mpp=25&noise=3&sort=Position&view=Quick#xx0xx
I collected the various values required for the header from the SpWaveFormatEx object - see SAPI5 SDK.
SAPI 5 TTS SpMemoryStream - WAVE Header?
14-Oct-09
The SAPI SDK is quite useful in providing simple TTS examples to create a WAV file (Using SpFileStream automation object) however I need to convert text to an MP3 file.
I can successfully convert the resulting WAV file created from the SpFileStream to MP3 however I want to skip the step of writing a wav file simply to convert it to mp3.
To avoid the step of creating the file I can create the audio to a memorystream from the text using SAPI's SpFileStream object however this does not create the WAVE/RIFF header required by the compression process.
Peter Bromberg's articles on TTS using SAPI & MemoryStream all confirm that no WAV header is provided with the raw audio so am I really stuck with this in-between process of writing to the filestream in order to access the header?? Seems silly... Anybody?? Peter??
thx in advance
Previous Posts In This Thread:
EggHeadCafe - Software Developer Portal of Choice
A Brief Review of Generic Collection Classes
http://www.eggheadcafe.com/tutorials/aspnet/91ebf47b-fd8d-4bc9-a715-40421048a450/a-brief-review-of-generic.aspx |