Nick Barnes
2004-Nov-29 07:08 UTC
[Asterisk-Users] Record() and problems converting with sox.
Hi, I'm trying to convert a high(er) quality wav/ulaw/alaw file (captured with Record()) to a gsm file and can't get the bugger to work. The example on the page http://www.voip-info.org/wiki-Asterisk+sound+files says that: $ sox inputfile.wav -r 8000 -c 1 outputfile.gsm resample -ql Should work, but I get the error message: sox: Input and Output rates must be different to use resample effect I get the same error message with $ sox -t la inputfile.alaw -r 8000 outputfile.gsm resample -ql And also with WAV, ulaw and everything else. I've trawled through the man page and am still completely bamboozled - it doesn't explain exactly what is necessary for it to work properly. I'm currently running sox version 12.17.6 (the latest) with gsm support enabled. Any ideas? Cheers, Nick.
Kevin P. Fleming
2004-Nov-30 09:20 UTC
[Asterisk-Users] Record() and problems converting with sox.
Nick Barnes wrote:> sox: Input and Output rates must be different to use resample effectThis means exactly what it says. You have asked for the output sample rate to be 8KHz, so apparently the input sample rate must _already_ be 8KHz, which means there is no resampling required. Since you said that the input file was recorded using the Record() app, then it's guaranteed that the input file is already 8Khz sample rate, since that's all Asterisk can generate.