Showing posts with label wav. Show all posts
Showing posts with label wav. Show all posts

Wednesday, February 20, 2008

AMR to mp3

Here is a code that you can use to convert AMR file to various other files:

Pre-requisites

Emerge sox, Vorbis-tools and lame. Build the the 3GPP reference converter files (compiled with these changes: make file without -DETSI and add #include "sp_dec.h" to decoder.c).

Convert AMR to OGG Vorbis

File: /usr/local/bin/amrtoogg

#!/bin/bash
 
# By Aquarion - Aquarion@Aquarionics.com
# Do what you want with it, it's not rocket science.
 
##Change these:
#Wherever you put encode and decode when you compiled them:
CODEC=/usr/local/bin
 
#Temporary directory. Chances are you've already got this set
TEMP=/tmp
 
#Where do the final MP3s go?
FINAL=/home/user/media/siemens/ogg
 
for file in *.amr; do 
        FILE=`echo $file | sed -e "s/.amr//"`; 
        echo -n "$FILE [AMR] -> [RAW]"
        $CODEC/decoder $file $TEMP/$FILE.raw > log.std 2> log.err; 
        echo -n " -> [WAV] "
        sox -r 8000 -w -c 1 -s $TEMP/$FILE.raw -r 44100 \
               -w -c 1 $TEMP/$FILE.wav > log.std 2> log.err; 
        echo -n " -> [OGG] "
        oggenc $TEMP/$FILE.wav -q 5 -o $FINAL/$FILE.ogg --quiet \
               -t "$FILE" -a "Sanda" -l "Anul nou" -d `date +%Y`
        echo  " :-) "
        rm $TEMP/$FILE.wav;
        rm $TEMP/$FILE.raw;
done

Convert AMR to MP3

File: /usr/local/bin/amrtomp3

#!/bin/bash
 
# By Aquarion - Aquarion@Aquarionics.com
# Do what you want with it, it's not rocket science.
 
##Change these:
#Wherever you put encode and decode when you compiled them:
CODEC=/usr/local/bin
 
#Temporary directory. Chances are you've already got this set
TEMP=/tmp
 
#Where do the final MP3s go?
FINAL=/home/user/media/siemens/mp3
 
for file in *.amr; do 
        FILE=`echo $file | sed -e "s/.amr//"`; 
        echo -n "$FILE [AMR] -> [RAW]"
        $CODEC/decoder $file $TEMP/$FILE.raw > log.std 2> log.err; 
        echo -n " -> [WAV] "
        sox -r 8000 -w -c 1 -s $TEMP/$FILE.raw -r 44100 \
               -w -c 1 $TEMP/$FILE.wav > log.std 2> log.err; 
        echo -n " -> [MP3] "
        lame $TEMP/$FILE.wav $FINAL/$FILE.mp3 --preset standard --silent \
               --tt $FILE --ta Sanda --tl Anul\ Nou --ty `date +%Y`
        echo  " :-) "
        rm $TEMP/$FILE.wav;
        rm $TEMP/$FILE.raw;
done

Sunday, February 10, 2008

How to convert AMR file to WAV file

Use this, to convert AMR file to WAV file

Mobile AMR Converter uses Sony Ericsson AMR converter to convert WAVE files (*.wav) to AMR (Adaptive Multi-Rate Codec, *.amr) and vice-versa. The program is very easy to use.

1) Launch Mobile AMR Converter.
2) Click on AMR to WAVE light button (below green picture: phone to PC).
3) Next, specify your input AMR filename: click on the first Browse light-button, select your amr file and click OK.
4) Click Convert .

http://www.hdmail.co.uk/MobAmrCon14-setup.zip