|
From: Jie W. <jw...@am...> - 2010-03-10 16:03:23
|
Thanks, Jan for the information. The sample vox file can be converted successfully and played back correctly. But the vox file we have is from Dictaphone, and it can't be converted successfully. Has anyone used vox to convert dictaphone vox files? Seems like Dictaphone has a customized header for their vox file formats. Thanks Jie Wu Software Developer -----Original Message----- From: Jan Stary [mailto:ha...@st...] Sent: Wednesday, March 10, 2010 1:18 AM To: sox...@li... Subject: Re: [SoX-users] VOX conversion support in SOX On Mar 09 16:32:10, Jie Wu wrote: > I was trying to convert a OKI ADPCM audio file > (http://www.nch.com.au/acm/sample.vox) using the following command: > sox -t raw -r 8000 -c 1 -e oki-adpcm sample.vox test.wav > > It always gives me "sox FAIL formats: bad input format for file > `sample.vox': data encoding was not specified" error. This is how soxi(1) sees the file: $ soxi sample.vox soxi WARN raw: `sample.vox': sample rate not specified; trying 8kHz Input File : 'sample.vox' Channels : 1 Sample Rate : 8000 Precision : 12-bit Duration : 00:00:04.40 = 35194 samples ~ 329.944 CDDA sectors File Size : 17.6k Bit Rate : 32.0k Sample Encoding: 4-bit OKI ADPCM Apparently, trying 8k is a good idea; at least play(1) plays the file correctly: $ play -V sample.vox gain -6 play: SoX v14.3.0 play WARN raw: `sample.vox': sample rate not specified; trying 8kHz Input File : 'sample.vox' Channels : 1 Sample Rate : 8000 Precision : 12-bit Duration : 00:00:04.40 = 35194 samples ~ 329.944 CDDA sectors File Size : 17.6k Bit Rate : 32.0k Sample Encoding: 4-bit OKI ADPCM Reverse Nibbles: no Reverse Bits : no Output File : 'default' (sndio) Channels : 1 Sample Rate : 8000 Precision : 16-bit Duration : 00:00:04.40 = 35194 samples ~ 329.944 CDDA sectors Sample Encoding: 16-bit Signed Integer PCM Endian Type : little Reverse Nibbles: no Reverse Bits : no play INFO sox: effects chain: input 8000Hz 1 channels play INFO sox: effects chain: gain 8000Hz 1 channels play INFO sox: effects chain: dither 8000Hz 1 channels play INFO sox: effects chain: output 8000Hz 1 channels In:23.3% 00:00:01.02 [00:00:03.38] Out:8.19k [ =====|===== ] Clip:0 I don't understand why you are specifying the encoding, channels, etc. It's all in the vox header (except the rate is not, but sox guesses it correctly as 8k). The easiest possible thing just works: $ sox -V sample.vox sample.wav sox: SoX v14.3.0 sox WARN raw: `sample.vox': sample rate not specified; trying 8kHz Input File : 'sample.vox' Channels : 1 Sample Rate : 8000 Precision : 12-bit Duration : 00:00:04.40 = 35194 samples ~ 329.944 CDDA sectors File Size : 17.6k Bit Rate : 32.0k Sample Encoding: 4-bit OKI ADPCM Reverse Nibbles: no Reverse Bits : no Output File : 'sample.wav' Channels : 1 Sample Rate : 8000 Precision : 12-bit Duration : 00:00:04.40 = 35194 samples ~ 329.944 CDDA sectors Sample Encoding: 16-bit Signed Integer PCM Endian Type : little Reverse Nibbles: no Reverse Bits : no Comment : 'Processed by SoX' sox INFO sox: effects chain: input 8000Hz 1 channels sox INFO sox: effects chain: output 8000Hz 1 channels sox WARN adpcms: sample.vox: ADPCM state errors: 8 The resulting sample.wav sounds just fine. (Don't know what "ADPCM state errors" are, though.) Jan ---------------------------------------------------------------------------- -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Sox-users mailing list Sox...@li... https://lists.sourceforge.net/lists/listinfo/sox-users |