GlovePIE script for comms
-
This script requires GlovePIE from: http://glovepie.org/glovepie_download.php
The script itself is a ten minute effort and based on a similar script that I’ve done for FSX. It only deals with communications in BMS (for now?) and does not use any fancy phrases. It just does what you’d do with the keyboard.
The script:
//BMS voice control script by ph34rb0t, Nov 2015 //Initialization if said("Listen up",5) or said("Start Listening",5) then var.vc = true say("Yes sir?") endif if said("Stand By",5) or said("Stop Listening",5) then var.vc = false say("Standing by.") endif if said("Are you listening?",5) then if var.vc = true then say("I am listening") else say("I am not listening") endif endif if var.vc=true then //Readback enable/disable if said("Disable Readback",5) then var.readback=false say("Fine, play with yourself.") endif if said("Enable Readback",5) then var.readback=true say("Readback enabled.") endif //Be friendly! if said("Thank you",5) or said("Thanks",5) then say ("You're welcome.") endif //COMMS key.Q=said("AWACS",5) or said("Sentry",5) if key.Q and var.readback=true then say("AWACS") endif key.W=said("Wingman",5) if key.W and var.readback=true then say("Wingman") endif key.E=said("Element",5) if key.E and var.readback=true then say("Element") endif key.R=said("Flight",5) if key.R and var.readback=true then say("Flight") endif key.T=said("Tower",5) or said("ATC",5) if key.T and var.readback=true then say("Tower") endif key.Y=said("Tanker",5) if key.Y and var.readback=true then say("Tanker") endif //Numbers key.One=said("Option One",5) or said("One",5) if key.One and var.readback=true then say("One") endif key.Two=said("Option Two",5) or said("Two",5) if key.Two and var.readback=true then say("Two") endif key.Three=said("Option Three",5) or said("Three",5) if key.Three and var.readback=true then say("Three") endif key.Four=said("Option Four",5) or said("Four",5) if key.Four and var.readback=true then say("Four") endif key.Five=said("Option Five",5) or said("Five",5) if key.Five and var.readback=true then say("Five") endif key.Six=said("Option Six",5) or said("Six",5) if key.Six and var.readback=true then say("Six") endif key.Seven=said("Option Seven",5) or said("Seven",5) if key.Seven and var.readback=true then say("Seven") endif key.Eight=said("Option Eight",5) or said("Eight",5) if key.Eight and var.readback=true then say("Eight") endif key.Nine=said("Option Nine",5) or said("Nine",5) if key.Nine and var.readback=true then say("Nine") endif key.Zero=said("Option Zero",5) or said("Zero",5) if key.Zero and var.readback=true then say("Zero") endif //EOF endif
Copy and paste the code above into an empty text file, then save it with whatever name you want, but give it a .PIE extension (I use “Falcon BMS.PIE”).
Start PIEFree.exe and open the script. Click “Run” to run it, then test it with the commands from the “Usage” section.Create a shortcut to PIEFree.exe in your GlovePIE installation folder. Rename the shortcut to your liking and then open its properties. In the “Target” box, after “PIEFree.exe”, add the following parameters:
/tray /run “[Path to your BMS .PIE script]”
Make sure that the path to your BMS .PIE script is contained in quotation marks as above. Lazy people can move the .PIE script into the GlovePIE installation folder and just have “/tray /run FSX.PIE” as parameters for PIEFree.exe.
The parameters mean that GlovePIE will start minimized to the system tray with the BMS voice recognition script running.
If GlovePIE is not supposed to run the script immediately after starting, leave out the “/run” parameter. You can still start the script by right-clicking GlovePIE’s icon in the tray and
selecting “Run”.
If you want to keep GlovePIE’'s window maximized and out of the tray, leave out the “/tray” parameter.
There are more command line options available for GlovePIE. Open the command line, browse to GlovePIE’s installation folder and type in “piefree.exe /?” (without quotation marks) to see them.Usage:
“Start listening” or “Listen up” -> Enable voice control
“Stop listening” or “Stand by” -> Disable voice control“Are you listening?” -> Check voice control status
“Enable readback” -> Voice commands will be read back to you, useful for debugging
“Disable readback” -> Voice commands will not be read back (default setting)“AWACS” or “Sentry” -> Sentry comms menu (“Q” key)
“Wingman” -> Wingman comms menu (“W” key)
“Element” -> Element comms menu (“E” key)
“Flight” -> Flight comms menu (“R” key)
“Tower” or “ATC” -> ATC comms menu (“T” key)
“Tanker” -> Tanker comms menu (“Y” key)“Option One” or “One” -> “1” key
“Option Two” or “Two” -> “2” key
“Option Three” or “Three” -> “3” key
“Option Four” or “Four” -> “4” key
“Option Five” or “Five” -> “5” key
“Option Six” or “Six” -> “6” key
“Option Seven” or “Seven” -> “7” key
“Option Eight” or “Eight” -> “8” key
“Option Nine” or “Nine” -> “9” key
“Option Zero” or “Zero” -> “0” keySpeech recognition:
GlovePIE works with the default speech recognition software available from Windows 7 on.
Set it up and do the training before you use GlovePIE to maximize recognition chances for the commands.
Win 7: “Start” → “Accessories” → “Ease Of Access” → “Windows Speech Recognition”
Win 10: “Start” → “All Apps” → “Windows Ease Of Access” → “Windows Speech Recognition”WSR does not need to run in the background to use GlovePIE.
To start speech training, run WSR, right click the tray icon and select “Configuration -> Improve Voice Recognition”.Remember: WSR does not play well with accents.
-
Nice. Does it work reliably? I would think your first option for each of the commands would be the least ambiguous. True?
-
It is pretty reliable for me.
GlovePIE treats any input command with the same priority. I’ve jut put in “Sentry”, “Tower”, etc…because sometimes the abbreviations just won’t roll off your tongue well enough to be recognized.