Skip to content

How to use Voice Attack

Jeffrey Gilliam edited this page Aug 17, 2018 · 8 revisions

Voice Attack is speech recognition software that can respond to voice commands. It can be found at http://www.voiceattack.com. There is a trial version that is limited to 20 commmands, but the paid version (USD$10 at the time of this post) is well worth it to get unlimited commands. You also have to use the registered version to be able to import the profile I have provided in the releases.

You can use VA to control other applications by sending key strokes to them. But that can be problematic if the SIM is not in the right mode to receive those key strokes. So, when SIMRacingApps Server is running, you can use URLs to send/receive values to the SIM that will always work. A complete list of the URLs can be found in the API documentation at http://simracingapps.com/docs/JavaScriptDoc/index.html.

Also, VA's volume is a little low and hard to hear. So, I use Voice Meeter Banana found at http://vb-audio.pagesperso-orange.fr/Voicemeeter/banana.htm to mix the sound coming from VA and the SIM and then output it to my speakers. It works by creating 2 virtual sound devices that you can make your default and map your SIM sound to the other. Unfortunately, VA will only use the default Windows device, so you have to make one of the virtual ones the default.

I have posted my VA profile with every release at http://download.SIMRacingApps.com for you to download and modify for yourself.

Installation: Importing as a separate profile

  1. Download the SIMRacingApps Voice Attach Profile from http://download.SIMRacingApps.com and save it.
  2. Download the Voice Attack Software from https://voiceattack.com and install it.
  3. For free, Voice Attach allows you to create a limited amount of commands. But, to enable the ability to import the SIMRacingApps profile, you must purchase it. It was only $10 as of March 2018.
  4. Start the Voice Attach software.
  5. Click the plus(+) sign or press Alt-I to import the profile.
  6. If all goes well, you should hear Voice Attack say "Starting Up" followed by the spotter commands.

Installation: Importing select commands into your own profile

  1. Download the SIMRacingApps Voice Attach Profile from http://download.SIMRacingApps.com and save it.
  2. Start the Voice Attach software.
  3. Edit your profile by clicking the pencil button.
  4. In the lower left corner, click the "import commands" button.
  5. Navigate to where you downloaded the SIMRacingApps profile and select it.
  6. Select the commands you want to import. See list below. There are some dependencies that you need for other commands.
    1. Startup: Has the SRA_Host and SRA_Port variables. You need this if you do not use localhost:80. It also calls the "Start Spotter" command if you are going to use those. You'll also need to make this run at profile load, or merge the commands into your own command. Click the "check mark" beside the profile name. The in the Profile General tab, set the command to execute on profile load to "Startup".
    2. _Say_SRA_dTime: Any command that says the time, calls this.
    3. Some commands are aliases to other commands. Make sure you import the command that actually does the work as well.

Example Command

In this example, I will use the URL to get the number of laps to go and say them to me.

  1. From the VA main screen, click the pencil to edit the commands for the selected profile. You can also create a new profile.
  2. Click on the "New Command" button.
  3. In the "When I say:" box enter "Laps To Go".
    1. Note: you can also bind this to a button as well.
  4. In the "When this command executes" box, click the "Other" button and select "Advanced -> Set a Text Value".
  5. In the "Variable Name" box, give it a name like "LapsToGo".
  6. Now select the "Value from file/URI" radio button and enter "http://localhost/SIMRacingApps/Data/Session/LapsToGo?output=value" in the box.
    1. Note: The URI is prefixed with the address of your server and ends with the API call to make. I used localhost here instead of your IP. Either will work. The parameter "output" is set to the value "value" to indicate we only want the value returned and not the entire JSON result.
  7. Now click "OK" to get back to the "Edit Command" window.
  8. Add another command in the sequence to say the result by clicking the "Other" button and selecting "Sounds -> Say something with Text-To-Speech".
  9. In the box enter "There are {TXT:LapsToGo} laps to go.". Note the syntax here to get to say the value of the variable, not the variable itself. Remember to use the same variable name in both places. I also believe the case must match.

And that's it. If you have VA setup correctly you should be able to say "Laps To Go" and it will tell you. Hope this is enough to get you started. You can also call the "set*" API to change tires, add fuel, etc.

Commands as of 1.6

      Add Fuel: Tops off the Fuel on the next pit
      Add Splash Of Fuel: Add just enough fuel to finish the race (Aliases: Add Splash)
      Ahead: Say who is ahead of you and how far.
      Ahead Class: Say who is ahead of you and far in your class.
      Ahead: Say who is ahead of you and how far.
      Behind: Say who is behind you and how far
      Behind Class: Say who is behind you and far in your class
      Behind: Say who is behind you and how far
      Camera Blimp: Changes the camera to the Blimp
      Camera Chase: Changes the camera to the Chase
      Camera Chopper: Changes the camera to the Chopper
      Camera Cockpit: Changes the camera to the Cockpit
      Camera Far Chase: Changes the camera to the Far Chase
      Camera Gyro: Changes the camera to the Gyro
      Camera Pit Lane: Changes the camera to the Pit Lane
      Camera Pit Lane Two: Changes the camera to the Pit Lane 2
      Camera Rear Chase: Changes the camera to the Rear Chase
      Camera Spectator: Changes the camera to the Spectator
      Camera TV One: Changes the camera to the TV1
      Camera TV Three: Changes the camera to the TV3
      Camera TV Two: Changes the camera to the TV2
      Change Four Tires: Changes All 4 tires at next pit stop (Aliases: All Tires, Change All Tires, Four Tires)
      Change Left Sides: Change Left Side Tires Only at the next pit stop (Aliases: Change Lefts, Left Sides)
      Change Right Sides: Change Right Side Tires Only (Aliases: Changes Rights, Right Sides, Two Tires)
      Fast Foward: Tells Replay to Fast Forward (Aliases: Forward)
      Fast Repair: Turns On Fast Repair Flag
      Fuel Level: Say your fuel level and how much you need to finish. (Aliases: Fuel)
      Full Service: Change all 4 tires and top off with fuel and tearoff
      Hide All: Hide All Apps
      Incidents: Say how many incidents you have
      Lap Time: Say what your last lap time was
      Laps In Tank: Say how many laps you can go on fuel (Aliases: Fuel Laps, Laps Until Pit)
      Laps To Go: Say how many laps to go for the leader
      Leader: Say who the leader is and how far ahead you are
      Leader Class: Say who the leader of your class is and how far ahead you are
      Next Lap: Tell Replay to goto next lap
      No Fast Repair: Turns Off Fast Repair Flag
      No Fuel: Do not take any fuel on next pit
      No Service: Do not take any service on next pit. Repairs only.
      No Tires: Do not take any tires on next pit
      Pass Left: Send a chat to the car behind you to pass left
      Pass Right: Send a chat to the car behind you to pass right
      Pause: Tells replay to pause (Aliases: Stop)
      Pitting In: Send a chat to everyone that you're pitting (Aliases: Pitting)
      Pitting Out: Send a chat to everyone that you're leaving pit road (Aliases: Exiting)
      Play: Tells replay to play
      Previous Lap: Tells replay to goto previous lap
      Remove Tearoff: Remove windshield tearoff on next pit or immediately ALT-T (Aliases: Change Windshield Tearoff, Change Tearoff, Tearoff)
      Rewind: Tells replay to rewind (Aliases: Reverse)
      Show All: Show All Apps
      Slowmotion: Tells replay to play in slowmotion (Aliases: Slow, Slow Down, Slower)
      Pitting In: Send a chat to everyone that you're pitting
      Start Flags: Watch for flags and tell what they are
      Start Gear Announcement: Say each gear as you change to it.
      Start Leader Change: Tell me anytime the leader changes and how far they are ahead of me
      Start Pit Road Speed: Tell me pit road speed on entrance to pit road and exit my stall
      Start SIMRacingApps: Start the SIMRacingApps server. Check the path
      Start Spotter: Start the Spotter Tasks
      Stop Spotter: Stop the Spotter tasks
      Thanks: Send a chat to the car behind you to say thanks
      Time Remaining: Say the time remaining in the race
      You are Welcome: Send a chat to the car ahead of you to say You're Welcome (Aliases: You're Welcome)

Commands as of 1.7 BETA

      Laps Led
      Increment Right Front
      Decrement Right Front
      Increment Right Rear
      Decrement Right Rear
      Increment Right Sides
      Decrement Right Sides
      Increment Left Front
      Decrement Left Front
      Increment Left Rear
      Decrement Left Rear
      Increment Left Sides
      Decrement Left Sides
      Increment All Tires
      Decrement All Tires
      What's the weather
You can’t perform that action at this time.