[asterisk-users] WAV49 output in sox

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Jul 25 15:09:45 CDT 2007


On Wed, Jul 25, 2007 at 03:29:49PM -0400, dave cantera wrote:
> eric
> try this... 
> sox foo.wav -r 8000 foo.gsm resample -ql
> # add -c1 to write the file in mono
> 
> I can't remember if you have to do something special in the recording 
> too....  depends on your recorder.. oh, now I remember.  you have set 
> the recording to 16bit 14400 hz or something like that...  if I find it 
> I'll re-email
> daveC

To generate a gsm encoding: -g .

So you can convert test_pcm.wav to a gsm-encoded test_gsm.wav with:

  sox test.wav -g test_pcm.wav

now, you'd probably want it with the extension WAV, and hence have to
tell sox the type explicitly:

  sox test.wav -g -t wav test_pcm.WAV

And let's also adjust the sample rate:

  sox test.wav -r 8000 -g -t wav test_pcm.WAV

Resample, for an even smaller file:

  sox test.wav -r 8000 -g -t wav test_pcm.WAV resample -ql

(didn't make a difference for my test file)

And let's make sure that the file is mono:

  sox test.wav -c 1 -r 8000 -g -t wav test_pcm.WAV resample -ql

I'm not sure how many of the above are actually required.

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list