Author Topic: TALK TO OPEN CHECKLIST BUT RESPOND WITH JOYSTICK OR KEYBOARD  (Read 642 times)

Airjunky737

  • Newbie
  • *
  • Posts: 2
TALK TO OPEN CHECKLIST BUT RESPOND WITH JOYSTICK OR KEYBOARD
« on: April 23, 2024, 09:57:24 PM »
Hi Guys, i am new to VoiceAttack and i am trying quickly to learn how to use it.

Basically, I fly a sim with P3D and just want to use Voice attack to read out my checklists. i do this by using the Dynamic Virtual Co-Pilot profile downloaded form VoiceAttack website.
I have managed to get all this working and it works well. For example, I will verbally say "Open Pre-flight Checklist" and it will start reading out my pre-flight checklist one at a time until i respond verbally with the phrase "Check" and then it will read out the next item.

I have found that the response to my verbal "check" command is variable. Preferably I would rather respond with a joystick button or keyboard command rather than say "check"each time. I have no idea how to do this....i have had some poor failed attempts.
Can any one help with how to do this i.e. use verbal command to activate checklist but use joystick button or keyboard button to replace the verbal "check" command??

Many thanks in advance,
Jim

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: TALK TO OPEN CHECKLIST BUT RESPOND WITH JOYSTICK OR KEYBOARD
« Reply #1 on: April 24, 2024, 02:48:35 AM »
As those profiles are based around the "Wait For Spoken Response" action, which runs synchronously, meaning the command waits for that action to be complete, it's not really feasible to just add a "Wait For Joystick Button Press" or "Wait For Key Press" action to it.

Assuming you only need one input method to advance the checklist, the simplest modification might be to just strip out nearly everything, and make a few modifications to end up with this:
Code: [Select]
MODIFY PATH AND FILE BELOW FOR YOUR CHECKLIST
Set text [~textfile] to [C:\Checklists\Checklist.txt]
-------------------------------------------
Start Indefinite Loop
    Set integer [~targetline] to [~targetline] plus 1
    Inline C# Function: Get line, wait until execution finishes
    Say, '{TXT:~lineOutput}'
    Begin Text Compare : [~lineOutput] Equals 'checklist complete'
    End Condition - Exit when condition met
    Wait for joystick button press [Joystick 1 Button 1]
End Loop
(obviously the file path would instead point to the relevant file on your system)

Stopping the checklist before it's complete would just be a matter of stopping the command itself, E.G. using another command containing the "Stop Another Command" action, or by stopping all commands.


As an aside, while it's certainly good that users share their profiles, and I don't intend to disparage them, this particular profile/command would not be an example I'd personally recommend learning from.

Airjunky737

  • Newbie
  • *
  • Posts: 2
Re: TALK TO OPEN CHECKLIST BUT RESPOND WITH JOYSTICK OR KEYBOARD
« Reply #2 on: April 24, 2024, 03:34:17 AM »
Hi Pfeil,
Thank you kindly for your response and assistance.

I wholeheartedly agree that this mod is not ideal so I do intend to teach the program to understand my pronunciation of the word ''Check'' soon. I suspect I need to repeat the speaking tutorial.

In mean-time, I will  use your suggestion to have it as an option B if  I can call it that.

Thank you too for this great program....worth every cent!!

Jim

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: TALK TO OPEN CHECKLIST BUT RESPOND WITH JOYSTICK OR KEYBOARD
« Reply #3 on: April 24, 2024, 03:40:46 AM »
Note that completing the speech recognition training at least three times is considered the absolute minimum.

If, after extensive training, you still find that specific words aren't recognized reliably, you could consider adding them to the speech recognition dictionary with a custom pronunciation.

Click the wrench icon on VoiceAttack's main window, and on the "Recognition" tab of the VoiceAttack options window click the "Utilities >" button, then choose "Add/Remove Dictionary Words"


To be clear: Gary is the sole author of VoiceAttack.