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?


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
| improve this answer | |
  • Hi ,if possible could you expand it to run on all files in a folder? – kRazzy R Feb 20 '18 at 21:21
  • 11
    @kRazzyR: for f in ls; do ffmpeg -i $f $(basename $f).wav; done – datakid Mar 31 '18 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. – tro May 2 '19 at 11:39
  • 3
    @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 Feb 17 at 20:32
  • How to get 32 bit floating point wav with mpg123? – F. Vosnim Jun 26 at 12:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.