[Asterisk-Users] Record() and problems converting with sox.
Tim Mattison
tim at marocon.com
Tue Nov 30 15:19:12 MST 2004
I use the following command-line:
sox input.wav -r 8000 output.gsm
It does rate conversion on my box no matter what the input rate is. I
routinely convert audio files from 22,050 Hz to 8,000 Hz like this and
it never lets me down. The placement of "-r 8000" is important. If you
put it before input.wav it doesn't do anything (or more correctly it
makes sox think it's already at 8,000 Hz and then the output just sounds
very slow).
Hope that helps.
On Tue, 2004-11-30 at 21:25 +0000, Nick Barnes wrote:
>
> Kevin P. Fleming
> > This 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.
>
> Indeed. This much is obvious.
>
> > 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.
>
> Which doesn't resolve my problem. How do I convert a wav (or ulaw, or alaw
> or whatever) to gsm? The example given on the wiki clearly doesn't work.
>
> Cheers,
>
> Nick.
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list