On Dec 29 10:09:44, sox-users@xxxxxxxxxxxxxxxxxxxxx wrote: > <html><head></head><body><div style="font-family: arial,helvetica,sans-serif; font-size: 12px;"><title></title>Hello,<br><br>I want to convert raw files from a Bat cording system to wav-files for the Bat analysing system.<br>And I found the Program SOX where I saw that it works with this to file formats.<br><br>I work with Windows 10<br><br>an I know from the Internet page of the Bat cording systeme that the<br><br>RAW files have no header<br><br>samplerate 500 kHz<br>little endien format<br>PCM 16-bits<br><br>other WAV files from an other Bat-cording system have<br><br>Channels : 1<br>Sample Rate : 312500<br>Precision : 16-bit<br>Sample Encoding: 16-bit Signed Integer PCM<br><br>so i tried a batchfile to convert<br><br>@echo<br>cd C:\temp\sox-14-4-2<br>for %%i in (C:\temp\*.raw); do (sox.exe -r 500k −b 16 -L −c 1 %%i -r 312500 -b 16 -L -c 1 .\converted\%%i.wav)<br>pause<br><br><br>but i get this back:<br><br>sox.exe FAIL formats: bad input format for file `C:\temp\20230523-N091_B0220-000014.raw': sampling rate was not specified<br><br>I thought the "-r 500k" is the information for the sampling rate.<br><br>Does anybody can give me an Idea to understand the line?<br>Thank you for all your Help<br><br>Markus</div></body></html> Don't send html to mailing lists. (Better yet, don't send html emails.) To be sure: "bat cording" is recording bat ultrasound echos? > do (sox.exe -r 500k âb 16 -L âc 1 %%i -r 312500 -b 16 -L -c 1 .\converted\%%i.wav) There are some strange characters in your sox options: 2d U+00002d - HYPHEN-MINUS 72 U+000072 r LATIN SMALL LETTER R 20 U+000020 SPACE 35 U+000035 5 DIGIT FIVE 30 U+000030 0 DIGIT ZERO 30 U+000030 0 DIGIT ZERO 6b U+00006b k LATIN SMALL LETTER K 20 U+000020 SPACE c3a2 U+0000e2 â LATIN SMALL LETTER A CIRCUMFLEX 62 U+000062 b LATIN SMALL LETTER B 20 U+000020 SPACE 31 U+000031 1 DIGIT ONE 36 U+000036 6 DIGIT SIX 20 U+000020 SPACE 2d U+00002d - HYPHEN-MINUS 4c U+00004c L LATIN CAPITAL LETTER L 20 U+000020 SPACE c3a2 U+0000e2 â LATIN SMALL LETTER A CIRCUMFLEX 63 U+000063 c LATIN SMALL LETTER C 20 U+000020 SPACE 31 U+000031 1 DIGIT ONE 20 U+000020 SPACE 25 U+000025 % PERCENT SIGN 25 U+000025 % PERCENT SIGN 69 U+000069 i LATIN SMALL LETTER I 20 U+000020 SPACE 2d U+00002d - HYPHEN-MINUS 72 U+000072 r LATIN SMALL LETTER R 20 U+000020 SPACE 33 U+000033 3 DIGIT THREE 31 U+000031 1 DIGIT ONE 32 U+000032 2 DIGIT TWO 35 U+000035 5 DIGIT FIVE 30 U+000030 0 DIGIT ZERO 30 U+000030 0 DIGIT ZERO (Did you copypaste some command line from somewhere, including the dashes? Or is it the html formatting of your email?) > but i get this back: > sox.exe FAIL formats: bad input format for file > `C:\temp\20230523-N091_B0220-000014.raw': sampling rate was not specified > I thought the "-r 500k" is the information for the sampling rate. The message might be misleading; but you don't specify -b and -c, so first fix your command line and try with _one_ file. Also, you don't need to specify the output parameters that do not change with respect to the input: sox -r 500k -b 16 -L -c 1 in.raw -r 312500 out.wav Jan _______________________________________________ Sox-users mailing list Sox-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/sox-users