Wednesday, August 4, 2010

Converting Audio Files in Ubuntu

You may select anyWAV audio file for any of the audio events. If you want to use a different audio format, such as MP3 or OGG, you will need to convert it to aWAV file. The easiestway to convert audio files iswith sox—the universal sound exchanger.

1. The sox package comes from the universe repository, but this repository is not enabled by default. As root, you will need to edit /etc/apt/ sources.list and uncomment the two universe lines. These should be near the top of the file and look similar to:

deb hardy universe
deb-src hardy universe

You will also need to update the repository cache:

sudo apt-get update

2. Install sox if it is not already installed.
sudo apt-get install sox

3. Use sox to convert the audio file. By default, sox determines file types by the file extension.

sox fileIN.mp3 fileOUT.wav

4. Test the sound file using the play command:

play fileOUT.wav

5. From the Sound Preferences applet, select the pull-down menu for the desired system sound, for example, ‘‘Login’’ and click ‘‘Select Sound File’’.

6. Select the WAV file you just created.

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: