On 2021-02-03 12:45, stan via users wrote:
I'm not completely clear on what you are trying to accomplish, but if you are trying to record using aplay and get an mp3 file, you should be able to do this with sox. A command like arecord tstxx | sox -t wav - tstxx.mp3 should do the trick. I haven't tested this, though. aplay can only play voc, raw, wav or au files, so will not be able to play mp3. sox can play, and record, many file types, including mp3. See the man page.
. I just want to be able to say "hello test" into the mic and create a compresses file, mp3 is convenient. I should be able to test with aplay as I can with the original which is by default a .wav/
arecord tstxx | sox -t wav - tstxx.mp3 dpes not peoduce an output file:
[bobg@WS-1 ~]$ arecord tstxx | sox -t wav - tstxx.mp3 Recording WAVE 'tstxx' : Unsigned 8 bit, Rate 8000 Hz, Mono ^CAborted by signal Interrupt... arecord: pcm_read:2153: read error: Interrupted system call sox FAIL formats: can't open input `-': WAVE: RIFF header not found
[bobg@WS-1 ~]$ ls -al tstxx.mp3 ls: unparsable value for LS_COLORS environment variable ls: cannot access 'tstxx.mp3': No such file or directory
I have been unable to find why it doesn't work?