2

I'd like to have a SoX one-liner that would record 1 hour of audio to mp3. I'm on Windows 7. Is this possible?

2
  • @c0dev I saw that question before. This question is different because I want to record to mp3.
    – Ram Rachum
    Oct 25, 2013 at 12:51
  • @RamRachum If the only difference between the questions is a file extension, I would consider it a duplicate.
    – user201262
    Oct 26, 2013 at 17:26

1 Answer 1

1

I don't know a one-liner, but a two-liner. Because SoX cant record mp3 you have to do it in two steps.

First, you record the audio as .wav-file:

rec recorded_track.wav 01:00

After that, you can convert it to a mp3-file by using SoX again.

sox infile.wav outfile.mp3
1
  • The problem with this is that there's a long processing step after recording. I want the conversion to be done in realtime while recording.
    – Ram Rachum
    Oct 25, 2013 at 17:33

Not the answer you're looking for? Browse other questions tagged .