lame --decode file.mp3 - | sox -v 0.5 -t wav - -t wav -b 16 -r 8000 -c 1 file.wav
ffmpeg -i file.m4a -ac 1 -ab 128k -ar 8000 -acodec pcm_s16le file.wav
NB: Get a list of supported decoders by running ffmpeg -codecs | grep D[E.]
lame -V2 input.wav output.mp3
sox input.gsm -r 8000 -c 1 -w -s ouput.wav
sox input.wav -r 8000 -c 1 -t gsm output.gsm
#!/bin/bash
for f in *.mp3; do
lame --decode $f - | sox -v 0.5 -t wav - -t wav -b 16 -r 8000 -c 1 $(basename -s .mp3 $f).wav
done
#!/bin/bash
for f in *.*; do
ffmpeg -i "$f" -ac 1 -ab 128k -ar 8000 -acodec pcm_s16le "${f%.*}.wav"
done
ffmpeg -i vm-intro.wav -ar 16000 -acodec g722 vm-intro.g722
http://wiki.innovaphone.com/index.php?title=Howto:Convert_wave_files_in_to_G722_coder_files
/usr/bin/ffmpeg -i sound.wav -acodec libopus -ar 8000 -ab 8000 sound.ogg
opusdec --force-wav sound.ogg sound.wav
additional options for astrisk compatible
opusdec --force-wav --rate 8000 sound.ogg sound.wav
sox -t raw -r 8000 -b 16 -c 1 -L -e signed-integer broken.wav fixed.wav
when record to wav was broken
ffmpeg -i input.amr -ar 12000 output.mp3
sox -V vm-intro.wav -r 8000 -c 1 -t ul vm-intro.ulaw
sox -V vm-intro.wav -r 8000 -c 1 -t al vm-intro.alaw