[asterisk-users] WAV49 output in sox
Eric "ManxPower" Wieling
eric at fnords.org
Wed Jul 25 15:46:49 CDT 2007
[root at pbx-1 vm]# sox -h
sox: Version 12.17.8
[root at pbx-1 vm]# sox msg0000.wav -g -t wav test.WAV
sox: Overriding output size to bytes for compressed data.
Segmentation fault (core dumped)
[root at pbx-1 vm]#
[root at pbx-1 vm]# sox msg0000.gsm -g -t wav test.WAV
Segmentation fault (core dumped)
[root at pbx-1 vm]#
msg0000.wav and msg0000.gsm are both messages in a user's voice mailbox.
I'll see if I can get a newer version of sox.
Tzafrir Cohen wrote:
> 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.
>
More information about the asterisk-users
mailing list