Author Topic: Dictation multiple keys during spelling  (Read 2996 times)

Tshark

  • Newbie
  • *
  • Posts: 4
Dictation multiple keys during spelling
« on: March 12, 2021, 01:48:07 PM »
I am having a problem with the Dictation feature.  My speech is recognized correctly when dictation is first activated, but after that there are multiple letters for the recognized speech.  Speech to text output looks like this:

This is a test
ttthhhiiisss   iiisss   aaa   ttteeesssttt


Here is the code I am using:

Toggle VoiceAttack listening
Play sound, '{VA_SOUNDS}\activation.wav'
Start Loop While : [{STATE_KEYSTATE:ENTER}] Equals '0'
   Start Dictation Mode (Clearing Dictation Buffer)
   Start Loop While : {[EXP:{DICTATION} + {STATE_KEYSTATE:ENTER}}] Eqauls '0'
   End Loop
   Stop Dictation Mode
   Quick Input, '{DICTATION}'
End Loop

I have also tried adjusting the code so that it doesn't use Quick Input.  Instead text copies to clipboard and pastes via CTRL+V, but get the same results.  Adjusting different times for keypress and wait states in the Quick Input don't seem to make a difference either.

I appreciate any suggestions.

Thanks for your time,

Tshark


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Dictation multiple keys during spelling
« Reply #1 on: March 12, 2021, 01:54:45 PM »
Do the "Append Dictation Buffer" messages in the log on the main window look normal, or do they also show these repeated characters?

Have you tried using a "Write a Value to the Event Log" action to check the actual contents of the dictation buffer (by using the "{DICTATION}" token to retrieve said contents)?


As a side note, you can right-click the action list, choose "Copy All as Text" from the context menu, then paste here into a code block (click the # button)

Tshark

  • Newbie
  • *
  • Posts: 4
Re: Dictation multiple keys during spelling
« Reply #2 on: March 12, 2021, 04:22:33 PM »
Thanks for the quick reply!

The messages in the "Append Dictation Buffer" look normal.

I tried the "Write a Value to the Event Log {DICTATION} and that also looks normal.

The output from VA to any other program looks good on the first transmission, but subsequent dictations get the extra key presses.

For info I do not get this problem using the VaicomPro dictation, but I don't think it is using the VA dictation feature.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Dictation multiple keys during spelling
« Reply #3 on: March 12, 2021, 04:41:11 PM »
It's strange that it's typing simultaneously, as the "Quick Input" action is supposed to run synchronously (I.E. the command waits until it's done typing before proceeding).

How are you testing? Does this behavior occur in Notepad?

When you say the same thing occurs when using the "Set a Text Value to the Windows Clipboard" action, did characters repeat, or was the same phrase pasted multiple times (E.G. "this is a testthis is a test this is a test")?

Are you seeing any "Dictation mode already started." log messages?

If you stop all commands after this issue starts occuring, is more than one instance of your dictation command stopped?

Tshark

  • Newbie
  • *
  • Posts: 4
Re: Dictation multiple keys during spelling
« Reply #4 on: March 12, 2021, 05:29:42 PM »
I am testing through Notepad and the text window in Aces High III.

I do get "Dictation mode already started" messages.

Here is a copy of the log:

4:25:01.208 Dictation mode already started.
4:25:01.208 Dictation mode already started.
4:25:01.192 Dictation buffer cleared
4:24:56.978 Append Dictation Buffer: this is still a test
4:24:56.157 Dictation mode already started.
4:24:56.126 Dictation mode already started.
4:24:56.033 Dictation buffer cleared
4:24:53.145 Append Dictation Buffer: this is a test
4:24:50.011 Dictation mode already started.
4:24:49.969 Listening resumed
4:24:49.935 Joystick : 'dictate'
4:24:46.564 Dictation mode already started.
4:24:44.539 Dictation buffer cleared
4:24:44.493 Listening suspended
4:24:44.461 Joystick : 'dictate'
4:24:42.159 Append Dictation Buffer: we are still testing
4:24:34.578 Dictation buffer cleared
4:24:30.408 Append Dictation Buffer: this is still a test
4:24:28.921 Dictation buffer cleared
4:24:26.005 Append Dictation Buffer: This is a test
4:24:23.119 Dictation buffer cleared
4:24:22.887 Listening resumed
4:24:22.718 Joystick : 'dictate'
4:24:19.146 Plugin 'VAICOM PRO 2.5' initialized.
4:24:19.141 Ready for commands.
4:24:19.132 Listening suspended
4:24:19.102 UNABLE TO ACCESS COMMAND. COMMAND NOT AVAILABLE (Chatter)
4:24:18.583 Initializing..
4:24:18.583 Press LCtrl+LAlt+C for config.
4:24:18.583 VAICOM PRO for DCS World. License: PRO
4:24:18.447 Plugin support enabled.

I do not know why Vaicom Pro plugin is loading as this is a different .vap

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Dictation multiple keys during spelling
« Reply #5 on: March 12, 2021, 05:38:53 PM »
You're using a joystick button to trigger the command, but are you pressing the enter key to stop the command?

As the outer loop is set up to only stop when the enter key is pressed, if you don't do that, you're actually starting another instance of the same command every time you press your joystick button.

Each of these commands starts typing out the dictation buffer simultaneously, resulting in the duplicate characters.


Plugins are not loaded or unloaded alongside a given profile. It's up to the plugin author to make sure their plugin does not interfere with other profiles.

Tshark

  • Newbie
  • *
  • Posts: 4
Re: Dictation multiple keys during spelling
« Reply #6 on: March 12, 2021, 05:55:13 PM »
That makes sense.  I will try with an enter key command and confirm. 

Thanks again for all the help  :)