How to convert and play .amr files on GNU/Linux OS



The .amr files are produced by voice recorders used in many mobile
devices like mobile phones, or flash audio players with recording
function.

In Linux we have the "amrnb" and "amrwb" packages to handle these
files.

In some distributions these packages are not available in the
core distribution. E.g. in debian they are provided by the
http://www.debian-multimedia.org repository, so you should use
e.g.:

deb http://www.debian-multimedia.org testing main

in your /etc/apt/sources.list file

If you are using the stable distribution, you should use the mirror,
read the http://www.debian-multimedia.org/debian-m.php first.

OK. So if you have the necessary package installed, you can start converting
the .amr files:

First you should decode the file to the raw format:
$ amrnb-decoder Sound_clip_01.amr s1.raw
which should produce something like this:
===================================================================
TS 26.104
REL-5 V5.4.0 2004-03
REL-6 V6.1.0 2004-03
3GPP AMR Floating-point Speech Decoder
===================================================================

Then you can convert the resulting .raw file to other preferred format
like .ogg:
$ sox -r 8000 -s -2 s1.raw -t ogg test.ogg
and finally to play it
$ xmms test.ogg

--
I hope you'll find this info useful,
Anonymous

.