Toru Yagi <yagitohru@xxxxxxxxxxx> writes: > On 1/18/19 9:54 PM, Måns Rullgård wrote: >>> $ rec -c 2 -b 16 -r 48000 -p trim 0 20 | >>> sox -V3 -c 2 -b 16 -r 48000 -p test.wav trim 0 10 : newfile : restart >>> >>> I want to record 16-bit wav files, but the files generated are 32-bit ones. >> >> Put the "-b 16" option immediately before the output file argument. You >> can also drop all the format options preceding the -p since the pipe >> format already includes all information. > > $ rec -c 2 -r 48000 -b 16 -p trim 0 20 | sox -p test.wav trim 0 10 : newfile : restart > rec WARN formats: sox can't encode to 16-bit > [...] > Is the position of "-b 16" option okay? No, it needs to go immediately before the "test.wav" argument. >> That said, why don't you do the splitting directly with the rec command? >> This should work: >> >> $ rec -c 2 -b 16 -r 48000 test.wav trim 0 10 : newfile : restart > > I understand it, but I have to save test.wav first. > I just want to split into wav files while I record from the line input. The command I suggested does exactly that. -- Måns Rullgård _______________________________________________ Sox-users mailing list Sox-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/sox-users