SoX is used to play music through commandline. It supports most of the audio formats like wav, mp3, mpg, ogg, flag, etc.
1. In order to use this, first we’ve to install this. Type the following command on the Terminal:
2. After installation, run the command below to make SoX play.mp3 or any other audio file format.
$ sudo apt-get install sox libsox-fmt-all
3. After it is done. Now you are ready to play any audio file from your directory.
4. To play, type following:
/$ play *mp3
5. To play specific file, simply type;
/$ play neon.mp3
6. To play next track Press Ctrl+c once and to stop player, Press Ctrl and hit c twice.
7. To get more information related to SoX, type man sox in the terminal and press enter. You’ll get all here.