I want to record 10 seconds of audio from my microphone input with SoX. I haven’t found any example in the documentation or elsewhere that would show how to do it. Here’s my current command using timeout to stop the recording. Is there a better way to do it?
timeout 10 sox -b 32 -e unsigned-integer -r 96k -c 2 -d --clobber --buffer $((96000*2*10)) /tmp/soxrecording.wav