Installing FreePie

Installation

 * Download and install FreePIE .

Validate installation
import time if starting: speech. say ( "One!" ) time. sleep ( 1 ); speech. say ( "Two!" ) Normally it should works you should listen "One", then "Two".
 * Launch FreePIE
 * Create a new script file (File > New...)
 * Enter this script
 * Run the script (Script > Run script...)

If you don't listen it, please check go to Control Panel and look if you have "Voice Recognition" installed. If not, you need to install the Redistribuable Microsoft Speech Runtime

Voice pack
By default, only Microsoft Anna is available (English female). If you want another voice to play Text-To-Spech, you need to download and install additional langage pack (And choose TTS packages, like MSSpeech_TTS_fr-FR_Hortense.msi for french voice)

Once dowloaded and installed, open the Control Panel and seach for Voice (or Voix in french, etc...), then choose "Update Narator Voice" and choose the new voice to use.

FreePIE Script to convert Voice command to Keyboad Shortcuts
Launch FreePIE and load this python script then run it (this script is based on the following sample )

I will describe only the configurable part of the script. if starting: enabled = False confidenceLevel = 0.7 v2k = VoiceToKeyboard ( confidenceLevel ) v2k. addCommand ( "Check temp", "" , KeyPress ( [ Key.RightAlt, Key.J ] )) v2k. addCommand ( "Position", "" , KeyPress ( [ Key.RightAlt, Key.K ] )) if enabled == False : if speech. said ( "Hey box", confidenceLevel): speech. say ( "We are listening" ) enabled = True if enabled: if speech. said ( "Over", confidenceLevel): speech. say ( "Understood, Over" ) enabled = False if enabled: v2k. executeLoop By default the script is "Disabled", this mean that he will only react to a "Hey box" vocal command.
 * 1) Config and commands
 * 1) Key Press

Once you have said this command, as soon as you say "Check temp" it will simulate a RightAlt+J key pressed, and if you say "Position" it will simulate a RightAlt+K key pressed.

To come back to a disable mode, just say "Over".

If you don't want the "Listen" / "Over" filter, and you want the script continuouly listen for order command, you can use: if starting: confidenceLevel = 0.7 v2k = VoiceToKeyboard ( confidenceLevel ) v2k. addCommand ( "Check temp", "" , KeyPress ( [ Key.RightAlt, Key.J ] )) v2k. addCommand ( "Position", "" , KeyPress ( [ Key.RightAlt, Key.K ] )) v2k. executeLoop Don't forget to use command that match the language of your Recognizer voice engine (Control Panel > Voice Recognizer > Voice Synthese > First tab)
 * 1) Config and commands
 * 1) Key Press