I am posting my recordings as "audio/x-wav" in my application and saving them as .wav files on the server - they play fine - however when i then try to convert them using an mp3 encoder i always get an error, no matter which encoder i use, particularly with lame
i also get an error when i try to import them into flash or into another application...is there something i am not aware of with respect to these files - should i save them as something else before converting? what is the best way to save them so that i can compress them after? is there a way to compress them when they are posted?
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
invalid wav format in posted audio files
All 3 IVR formats have the same data size, 8KHz 8bit data
Hello,
There are formats for audio files recorded by our VoiceXML browser:
All three of these IVR formats have the same data size, 8KHz 8bit data. So there is no compression gained by switching the format. The audio/x-wav format is the most portable of these because it contains a header describing the data format of the audio.
In order for most desktop software such as flash or lame to use this audio you will need to convert the u-law wav file to a data format that the software understands. You can think of wav as a header that describes the data and u-law as the data itself. Almost all audio tools can read a wav header, but most can not decode u-law data. You will need to convert the audio into linear pcm wav file with a tool like sox:
After you have it in linear pcm wav format you can play it back using flash software or convert it to an mp3 using lame.
Regards,
Plum Support
There are formats for audio files recorded by our VoiceXML browser:
Code: Select all
audio/x-wav: wav header + u-law data
audio/basic: headerless u-law data
audio/x-alaw-basic: headerless a-law data
In order for most desktop software such as flash or lame to use this audio you will need to convert the u-law wav file to a data format that the software understands. You can think of wav as a header that describes the data and u-law as the data itself. Almost all audio tools can read a wav header, but most can not decode u-law data. You will need to convert the audio into linear pcm wav file with a tool like sox:
Code: Select all
sox ulawfile.wav -l -w pcmfile.wav
Regards,
Plum Support
Last edited by support on Mon Jan 04, 2010 4:56 pm, edited 2 times in total.
ok that's fine if i am just converting a few files here and there - what if i want to convert files on the fly in my application and don't have access to a command line (i.e. in coldfusion) then those .wav files are pretty much useless to me. I now need to process one file twice in order to use it?
do you know if sox has any conversion algorithms written in java or c++ that i can use - or if they have a web service i can access instead of a command line execution?

do you know if sox has any conversion algorithms written in java or c++ that i can use - or if they have a web service i can access instead of a command line execution?
i have managed to convert the file to linear pcm and then to mp3 using lame but the quality is very poor, and if i use a VBR setting which improves the quality, then i have problems again with flash recognizing it
i need to stream the mp3s with flash so they need to be decent quality and proper format
do you have any suggestions on the best command line arguments to use with sox and then the best bit rate and quality settings to use for compressing? i do not work with audio often so your help is really appreciated esp with regards to formats...
should i just record the original message on the vxml platform using audio/basic or stick with the audio/x-wav?
i need to stream the mp3s with flash so they need to be decent quality and proper format
do you have any suggestions on the best command line arguments to use with sox and then the best bit rate and quality settings to use for compressing? i do not work with audio often so your help is really appreciated esp with regards to formats...
should i just record the original message on the vxml platform using audio/basic or stick with the audio/x-wav?
Recording audio for IVR use
Hello,
You should be recording the audio in audio/x-wav for the IVR system. This format is exactly the same as audio/basic except that it comes in a file with a header at the beginning saying that it contains u-law data. This helps you by all the necessary information to the audio conversion software about the format of the internal audio.
Have you tried playing the audio back using the linear pcm in flash? This is a decent format for you to push audio around since it very portable and no data loss will occur. If you must convert it to mp3 a good IVR format option is:
This IVR format should retain most of the audio data and allow for smaller file sizes (almost 1/3 of the original u-law file). You can also experiment with using a lowpass filter to remove data you don't want being sent anyway (for example: --lowpass 5).
Regards,
Plum Support
You should be recording the audio in audio/x-wav for the IVR system. This format is exactly the same as audio/basic except that it comes in a file with a header at the beginning saying that it contains u-law data. This helps you by all the necessary information to the audio conversion software about the format of the internal audio.
Have you tried playing the audio back using the linear pcm in flash? This is a decent format for you to push audio around since it very portable and no data loss will occur. If you must convert it to mp3 a good IVR format option is:
Code: Select all
16KHz 16kbps mono:
lame -h test.wav -b 16 --resample 16 -a test.mp3
Regards,
Plum Support