1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

Use your voice to control fuel, brake bias and so on!

Discussion in 'F1 2012 - The Game' started by Chicane500, Oct 27, 2012.

  1. Changing fuel, tyres and brakes too much work? Not enough buttons on your wheel for all those macros? There's a mighty 'button' available: your voice!
    Demonstration:

    Hardware needed:
    - a microphone (even very cheap one will do)
    Software needed:
    - GlovePIE (I use version 0.43) it's free and available from various sources, such as http://glovepie.org/GlovePIEWithoutEmotiv043.zip
    When the program has opened, you can start writing a script. To get you started very quickly, here's mine with some instructions included:
    When finished writing you can save it, and then run it. Enjoy!
    Code:
    //GlovePIE script created by Chicane
    //In this script: Make fuel choices, tyre choices and brake bias choices with YOUR VOICE in F1 2012! Also added: Car Status switch and instantly restart your time trial hotlap.
    //INSTRUCTIONS
    //set your ingame quickmenu keys to WASD-keys and car status to Q-key or edit this script
    //if your voice isn't understood very well or your mic is worse than awful, try changing the green 3 after ", and in front of ) to another value from 0 to 6. It's a tolerance setting. Default = 2
    //you should leave a couple of seconds between 2 commands, else the 2nd command may not be executed correctly. This is the same with using scripts in for example Logitech Profiler when creating macros so the problem is somewhere ingame. Experiment to find out whatever is the cross-over point.
    //The list of possible commands, actions ande scripts is huge. Have a read through the documentation to learn more. GlovePIE forum: http://glovepie.org/forum/index.php
    //END OF INSTRUCTIONS
    //I've managed to create this script thanks to other people sharing their knowledge, and therefore I'm sharing this too! You're allowed to adjust and share this script.
    //disclaimer: Script has been tested with English version of Windows7, and English language version of the game. I take no responsibility fole for any damage (including hardware, software and your voice) by using (parts of) this script.
     
    //ACTIVATE AND IGNORE MICROPHONE OPTIONS
    //Microphone.Enabled = joystick.Button11 //button is 3rd gear on the H-shifter of G27, option to only let the script execute commands when you hold this button. Can be useful if you're on voice communication with others, such as Teamspeak and you do NOT use push-to-talk in Teamspeak. Adjust the button to your liking.
    Microphone.PushToNotTalk = joystick.Button12 // (when in 4th h-shifter gear on G27) option to only let the script execute commands when you DON'T hold this button. Can be useful if you're on voice communication with others, such as Teamspeak and you use push-to-talk in Teamspeak. Adjust the button to your liking.
     
    //FUEL MIX CHOICES
    IF Said("mix three",3)// Adjust between the "" what you want to say to activate mix3/rich fuel.
    //say "confirmed" I'd recommend not to use extra audio confirmation, but it's possible to do so. You could even add different kinds of confirmations for different actions.
    press w
    wait 40ms //if game doesn't fully execute your voice commands, try making the wait times longer.
    release w
    wait 40ms
      press w
    wait 40ms
    release w
    wait 40ms
      press w
    wait 40ms
    release w
    endif
     
    IF Said("mix two",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press w
    wait 40ms
    release w
    wait 40ms
      press d
    wait 40ms
    release d
    endif
     
    IF Said("mix one",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press w
    wait 40ms
    release w
    wait 40ms
      press key.s
    wait 40ms
    release key.s
    endif
     
    //TYRE CHOICES
    IF Said("prime tyres",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press d
    wait 40ms
    release d
    wait 40ms
      press w
    wait 40ms
    release w
    endif
     
    IF Said("option tyres",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press d
    wait 40ms
    release d
    wait 40ms
      press d
    wait 40ms
    release d
    endif
     
    IF Said("intermediate tyres",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press d
    wait 40ms
    release d
    wait 40ms
      press key.S
    wait 40ms
    release key.S
    endif
     
    IF Said("full wet tyres",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press d
    wait 40ms
    release d
    wait 40ms
      press a
    wait 40ms
    release a
    endif
     
    //BRAKE BIAS CHOICES
    IF Said("Brakes front",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press key.S
    wait 40ms
    release key.S
    wait 40ms
      press w
    wait 40ms
    release w
    endif
     
    IF Said("Brakes normal",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press key.S
    wait 40ms
    release key.S
    wait 40ms
      press d
    wait 40ms
    release d
    endif
     
    IF Said("Brakes rear",3)
    press w
    wait 40ms
    release w
    wait 40ms
      press key.S
    wait 40ms
    release key.S
    wait 40ms
      press key.S
    wait 40ms
    release key.S
    endif
     
    //CYCLE CAR STATUS
    IF Said("Car status",3)
    press key.Q
    wait 40ms
    release key.Q
    endif
     
    //INSTANTLY RESTART TIME TRIAL HOTLAP
    IF Said("restart time trial",3)
    press key.Escape
    wait 40ms
    release keys.Escape
    wait 40ms
    press key.up
    wait 40ms
    release key.up
    wait 40ms
    press key.up
    wait 40ms
    release key.up
    wait 40ms
    press key.up
    wait 40ms
    release key.up
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
    Press key.Down
    wait 40ms
    release key.Down
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    endif
     
    //'DEBUGGING'
    //I have not tested this, but these 'debug lines' may actually work, so you get feedback why a command isn't executed. Remove the // to use
    //if Microphone.TooFast then say(“Don’t talk so fast.”)
    //if Microphone.TooSlow then say(“You need to talk faster.”)
    //if Microphone.TooLoud then say(“Stop shouting. I’m not deaf.”)
    //if Microphone.TooQuiet then say(“Speak up, I can’t hear you.”)
    //if Microphone.HeardNoise then say(“I can’t hear you over the noise.”)
    
     
    • Like Like x 21
    • Winner Winner x 1
  2. Wow Rob! Thats a great idea, and most of all it works.
    Only problem for me is that i like to use my speakers to play, and my only mic is on a sony wireless headset which covers my ears and i'll not hear anything else :roflmao:
    But with a headset without the speakers, just the mic, plus a head tracking device and this, just perfect! :thumbsup:
     
  3. Works for me. Really brilliant.
     
  4. Tom

    Tom
    Staff Emeritus Staff

    Nice - putting this on the plan for tonight. :)

    Nice accent, Rob. You sound exactly like a dude from the office, he's from the Netherlands as well. :D
     
    • Like Like x 4
  5. Graham Laing

    Graham Laing
    ...... mostly harmless Staff

    So all I need is "bollocks" = Reset to Track :D ;)
     
    • Like Like x 3
  6. Can we make it so I can say 'kkkkeeeeeeeeeeeeeeeeerrrrrrrrrrrrrrrrrrrssssssssssss' and as long as you hold it it activates kers and when you stop muttering its stops :D:p.
     
  7. didn't think of that, and I don't like it when people use 'reset to track' online, but it's easy to code in. You only need to know when the game gives you the option in the menu to use reset to track, or spread it over 2 commands.

    I wouldn't be surprised if it was possible to code in some way. Didn't go through all documentation.:p
    But on a serious note: there's of course a little lag between saying the command and when it's executed, so you shouldn't use it on stuff like KERS and DRS where timing is critical.
     
  8. I had such a great time racing with this this evening, it's really brought the game alive. We have a G27 here and the quick menu controls are off on the shifter - it's not always that easy to access. But with this program I'm able to adjust brake bias for every significant corner (gained me a new PB some 0.4 sec better in India) and change my fuel mix on the straights.

    Now I just have to think of some other things to map.

    Thanks again!
     
    • Like Like x 1
  9. Tom

    Tom
    Staff Emeritus Staff

    Welsh F1 2012, here we go!

    "CURSE YOU! GIVE ME THEM SOFT RUBBERS!"

    :D
     
    • Like Like x 2
  10. Can you tell me how i can bind the voice activation to Xbox360 gamepad because my wheel isnt here.
     
  11. Graham Laing

    Graham Laing
    ...... mostly harmless Staff

    Here you go ....... 3 full sets! :)

    durex.jpg
     
    • Like Like x 5
  12. For free? I want some too! :D
     
  13. LOL

    Didn't they discountied these? I thought it's called Fetherlite Ultima these days. :D
     
    • Like Like x 1
  14. This is so good!!! Thx a million for sharing, works like a dream!
     
  15. meretko

    meretko
    @ Simberia @Simberia

    Rob i don't try but seems like unbelievable really fantastic very good work
     
  16. The script is written in such a way that you should map that quickmenu keys to W A S D.
    But if you want to keep em on the pad, you may try replacing every W in the script with joystick.Pov1Up , every D with joystick.Pov1right, every key.s with joystick.Pov1down and every A with joystick.Pov1left. Not sure though if it works, you'll have to try yourself.
    Basically you just have to make sure that the assigned ingame buttons match the buttons in the script.
     
  17. It doesn't work.
     
  18. Maybe joystick.pov2up ect, because the xbox360 controller has an analogue stick as well.
    It doesn't really matter though, because the voice-script is there so you DON'T have to push the assigned keys ;)
     
  19. Hi guys,

    I've been messing about a bit more with this and thought I'd share a few more voice mappings I compiled to add to Rob's ones. Tested and working for me with my G27.

    They are return to garage, go out on a flying lap from the garage, drive out of the garage and adjust fuel to qualifying load (in this case 5 laps). The last one I find useful as every time I go back to the garage in practice it resets my fuel to 10 laps, which is not ideal when I'm doing a few quali simulation runs. It assumes you are facing the driver monitor (not the engineer menu), and obviously that you're in practice, otherwise you will have only 5 laps onboard anyway. Career mode only. [Edited to add that the setup menu always starts where you last left off within it (so if you adjusted toe last it starts there when you click on the setup), so you must have chosen your fuel load as your last manual setup command]

    Code:
     //INSTANTLY RETURN TO GARAGE
    IF Said("return to garage",3)
    press key.Escape
    wait 40ms
    release keys.Escape
    wait 40ms
    press key.up
    wait 40ms
    release key.up
    wait 40ms
    press key.up
    wait 40ms
    release key.up
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
    Press key.Down
    wait 40ms
    release key.Down
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    endif
     
    //INSTANT FLYING LAP
    IF Said("flying lap",3)
    press key.Escape
    wait 40ms
    release keys.Escape
    wait 40ms
    Press key.Down
    wait 40ms
    release key.Down
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
    Press key.Down
    wait 40ms
    release key.Down
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    endif
     
    //INSTANT DRIVE OUT
    IF Said("drive out",3)
    press key.Escape
    wait 40ms
    release keys.Escape
    wait 40ms
    Press key.Down
    wait 40ms
    release key.Down
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    endif
     
    //INSTANT LOW FUEL
    IF Said("qualifying fuel",3)
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
      press key.Right
    wait 40ms
    release key.Right
    wait 40ms
      press key.Right
    wait 40ms
    release key.Right
    wait 40ms
    press key.Right
    wait 40ms
    release key.Right
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
    press key.Enter
    wait 40ms
    release key.Enter
    wait 40ms
    press key.Down
    wait 40ms
    release key.Down
    wait 40ms
    press key.Down
    wait 40ms
    release key.Down
    wait 40ms
      press key.Left
    wait 40ms
    release key.Left
    wait 40ms
      press key.Left
    wait 40ms
    release key.Left
    wait 40ms
      press key.Left
    wait 40ms
    release key.Left
    wait 40ms
      press key.Left
    wait 40ms
    release key.Left
    wait 40ms
      press key.Left
    wait 40ms
    release key.Left
    wait 40ms
    press key.Escape
    wait 40ms
    release keys.Escape
    wait 40ms
    press key.Escape
    wait 40ms
    release keys.Escape
    wait 40ms
    press key.Escape
    wait 40ms
    release keys.Escape
    endif
    
     
    • Like Like x 3
  20. Hey , will this work with my g25?Can you help me?For example the option tyres in mine language means"lágy gumi" , will the program detect this command if i say this in microphone?Or it's not possible?Thank you in advance for your assistance:)