If you need to compress one or several audio files, here you can find some command line and graphical tools.

Table of Contents

SoX (CLI)

  • Convert WAV to MP3
      sox input.wav output.mp3
    
    • Converting to MP3 will reduce the file size (and quality).
  • Compress an MP3 file (reducing sample rate)
      sox input.mp3 output.mp3 rate <sample rate>
    
    • Reducing sample rate (16k, 24k, 48k) will reduce the size (and the quality). Check current sample rate with soxi input.mp3.
  • Compress an MP3 file (converting stereo to mono)
      sox input.mp3 output.mp3 channels 1
    
  • Compress several files (using a Bash loop)
      for i in *.mp3;do sox $i output/$i rate 16k;done
    

Kwave (GUI)

With this KDE audio editor, just open the file and save it changing the format and compression (File -> Open, File -> Save -> As...). You can change many options (select the output file path and name and click Save to see the options).

Kwave

Audacity (GUI)

Similar to Kwave, with Audacity you can also compress a file by changing the output format options. Press on File -> Export and select a format.

Audacity

If you have any suggestion, feel free to contact me via social media or email.