Creating a MP3 Player with Voice Attack for Games

In this tutorial I will show you how to create a voice controlled MP3 player using the Voice Attack Software.

 

Features:

Load MP3 Playlist 

Pause/Play

Next/Previous Song

Increase/Decrease Volume

Play/Stop

 

Issues:

You have to have VLC running minimized in background before you start your game or it pops up kicking you out of the game.

Loading multiple playlists does not remove previous playlist and instead adds the new songs to it.  You will instantly switch to new songs, but Issues if you have VLC set to random.

 

 

What you need:

VLC Player - http://www.videolan.org/

Voice Attack - http://www.voiceattack.com/

MP3 Playlist (On your system)

Command Line Media Controller - https://commandlinemedia.codeplex.com/

 

 

Steps:

 

1)      Install VLC Player if you don’t have it already.

Under "Tools - Preferences" of VLC, make sure "Allow only one instance" is checked... This can cause issues sometimes by loading an new player. Then you have two going at same time.

 

2)      Install Voice Attack to default location.

3)      Download Command Line Media Controller and copy the file “CLMControl.exe” to C:\Program Files (x86)\VoiceAttack\Tools.  Tools directory will not exist so create it.

4)      Create your playlist(s) of MP3 music you want to use.  If you don’t know how go here for a video tutorial on creating VLC playlists https://www.youtube.com/watch?v=4NP1jEvYX0U

5)      Create the Voice Attack profile…. 

 

Creating the Profile and Player

1)      Play a Playlist

 

 

Change Profile name to “MP3 Player” or whatever you want to call your MP3 Player Profile.

 

 

Select “New Command”

In the “Add a Command” box under “When I say:” enter what you want to say to load your playlist.  In my case I chose “Play Nine Inch Nails”.

Next Press “Other”…

 

 

Choose “Play a Sound” from the drop down.  This will be our computer voice response to our request.  If you don’t want a voice response then skip this part. 

In my case I have the Elite Dangerous – “HCS Voice Packs” installed from http://www.elitedangerousvoicepack.com/ and have chosen the “accessing music.mp3” response. It is found under C:\Program Files (x86)\VoiceAttack\Sounds\hcspack\applications.

Checkmark “Wait until sounds completes before continuing command”

Volume 100%

Preview to make sure it works and then click “OK”.

 

 

 

Choose “Pause” and set it to 2 seconds. Click OK…

 

 

Choose “Other” again.

Choose “Run an Application” from the dropdown.

Select your M3U playlist you created earlier.

Test to make sure it loads the player and plays.  VLC will need to be the default player for M3U files.

Click “OK”

 

 

You should now have something that looks like this.

Description and Category are up to you. I chose what you see below, but it can be anything.

Click “OK”

 

 

Click “Done”

Test command as usual by saying the command you created.  In my case “Play Nine Inch Nails”.

You should hear the response and then the music will start to play after a 2 second wait, give or take depending on load time of VLC.

 

 

2)      Pause Music

 

Click “New Command” again.  

 

 

Fill in the command “Pause Music” or whatever you want to say to pause the music.

Description and Category also.

Then click “Other”…

 

 

Choose “Run an Application” and choose CLMControl.exe from the tools directory you created at the beginning of the tutorial.  Should be located C:\Program Files (x86)\VoiceAttack\Tools\CLMControl.exe.

Under “With these parameters” add “vlc –pp” as shown in the image below. 

This will tell VLC to pause or play music.

Click “OK” 

 

 

Now you have as seen below…

Click “OK”

 

 

Right click the “Pause Music” command and choose “Duplicate”.

 

 

This time all you do is replace the command and description as seen below. 

Click “OK” then “Done”

Test the commands and they should work fine.  Granted since play and pause are the same saying “Play Music” when music is playing will pause and “Pause Music” when paused will play.

 

 

3)      Play Next Song

 

New command again…

When I say “Next Song” or whatever command you want.

Description and category

Choose “Other”

 

 

Once again choose the CLMControl.exe this time with “vlc –nt” as parameters.  (Next Track)

Click “OK” and “OK”.

 

 

4)      Previous Song

 

New command again…

When I say “Previous Song” or whatever command you want.

Description and category

Choose “Other”

 

 

Once again choose the CLMControl.exe this time with “vlc –pt” as parameters.  (Previous Track)

Click “OK” and “OK”.

 

 

 

Click “Done” and test the player.  You should now be able to load the playlist, Pause, Play, next track, and previous track. You can follow the steps above to create commands to increase and decrease player volume as well as other functions.

Simply choose the command you want like “Increase Volume” and use one of the parameters below:

 

        -p:             Play

        -pp:           Toggle between play and pause

        -pa:           Pause

        -s:              Stop

        -vm:          Volume Mute

        -mvm:      Master Volume Mute

        -vu:           Volume Up

        -mvu:       Master Volume Up

        -vd:           Volume Down

        -mvd:        Master Volume Down

        -nt:            Next Track

        -pt:            Previous Track

 


Print   Email