I have an Mp3 file i need to convert to .wav to be able to import it into a voice changer program.

How do I do this using the command line?

1 Answer 1


Using ffmpeg - installed by default

ffmpeg -i input.mp3 output.wav 

Alternative - mpg123

sudo apt-get install mpg123

Then to convert mp3 to wav (using -w option)

mpg123 -w output.wav input.mp3
  • Hi ,if possible could you expand it to run on all files in a folder?
    – kRazzy R
    Commented Feb 20, 2018 at 21:21
  • 12
    @kRazzyR: for f in ls; do ffmpeg -i $f $(basename $f).wav; done
    – datakid
    Commented Mar 31, 2018 at 2:06
  • 1
    @datakid Looks like syntax highlighter ate several symbols in your code. I've added your working solution into answer as UPD.
    – NG_
    Commented May 2, 2019 at 11:39
  • 8
    @datakid You should not parse ls output. Instead use for f in *.mp3; do ffmpeg -i "$f" "$(basename $f).wav"; done. This also includes proper quoting and limits calling ffmpeg for mp3 files only.
    – scai
    Commented Feb 17, 2020 at 20:32
  • How to get 32 bit floating point wav with mpg123?
    – F. Vosnim
    Commented Jun 26, 2020 at 12:54

You must log in to answer this question.

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