Convert Audio Files for Asterisk

From KlavoWiki
Revision as of 04:15, 27 June 2019 by David (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

To convert a file compatible with Asterisk, Mono 8khz
This will convert a mp3 file to wav

mpg123 -r 8000 -w or-disable.wav or-disable.mp3

Convert all files in a folder.
This will convert all mp3 files to wav and then delete the mp3 file.

for filename in *.mp3; do mpg123 -r 8000 -w  ${filename%%????}.wav ${filename}; rm -f ${filename}; done