KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Why is a new command not being recognised?
Topic Summary:
Created On: 05/18/2023 05:02 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Why is a new command not being recognised?   - wheels496 - 05/18/2023 05:02 AM  
 Why is a new command not being recognised?   - wheels496 - 05/18/2023 06:11 AM  
 Why is a new command not being recognised?   - missink - 05/18/2023 07:18 AM  
 Why is a new command not being recognised?   - Alan Cantor - 05/18/2023 09:28 AM  
 Why is a new command not being recognised?   - wheels496 - 05/18/2023 09:47 AM  
 Why is a new command not being recognised?   - Alan Cantor - 05/18/2023 01:06 PM  
 Why is a new command not being recognised?   - missink - 05/25/2023 12:18 AM  
 Why is a new command not being recognised?   - wheels496 - 05/25/2023 03:40 AM  
Keyword
 05/18/2023 05:02 AM
User is offline View Users Profile Print this message


wheels496
Top-Tier Member

Posts: 218
Joined: 10/01/2008

Just out of laziness, sometimes I do not write commands to make life easier for myself.

For example, for ages I said [Press Alt Tab], to switch to the previous application but then Dragon started misrecognises me (I have cerebral palsy which affects my speech slightly). Put up with this for a while but then came to my senses and created a command [Previous Application], which always works.

Therefore yesterday I came up with the idea of creating a master command for all keystroke combination. So I started with a small list, as follows:-

a\Alpha

b\Bravo

c\Charlie

d\Delta

e\Echo

I experimented with various command names ([Control <Letters>, 1 <Letters]). You can see I'm thinking of trying to come up with an easy way rather than [press control Alpha].

Anyway even with this partial list, Echo is the only one that works. By that I mean all the others are either recognised as dictation or not recognised at all (even if I switch to command mode).

I'm aware that I need to write the script-extract the written form implement SendKeys " et cetera but there is no point in doing all that until I am confident it is going to recognise the commands.

Any ideas?

Thanks


-------------------------

DP 16

 05/18/2023 06:11 AM
User is offline View Users Profile Print this message


wheels496
Top-Tier Member

Posts: 218
Joined: 10/01/2008

Now I am even more confused. I am now in the office, using a different voice profile (which I believe was copied from home several months ago).

On my office PC this command is recognised perfectly (a-e). At the moment it simply displays the contents of ListVar1.

-------------------------

DP 16

 05/18/2023 07:18 AM
User is offline View Users Profile Print this message

Author Icon
missink
Power Member

Posts: 62
Joined: 03/28/2015

I sometimes find that when the computer has been on for a while, recognition gets very bad, or certain commands (especially the new ones) stop being recognised as commands. Restarting Windows seems to fix that. There are also times when very weird errors happen, like certain vocabulary items disappearing after I add them, and that's a sign that I need to make a new profile. But I don't know if I've ever run into your situation, where the command works only for some of the list.

In case it saves you time, here is my version of your command. I say "con alpha" instead of "control alpha".

'#Language "WWB-COM"

'Example from list:
' a\alpha

Option Explicit
Dim secret_value As String

Sub Main

secret_value = Left(ListVar1, InStr(ListVar1, "\")-1)
SendDragonKeys "{Ctrl+" & secret_value & "}"

End Sub
 05/18/2023 09:28 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4615
Joined: 12/08/2007

If you command is called, for example, con <Letters>, change the list to this:

alpha
bravo
...
zulu

Then try this script:

Option Explicit

Sub Main
Dim secret_value As String
secret_value = Left(ListVar1, 1)
SendDragonKeys "{Ctrl +" & secret_value & "}"
End Sub
 05/18/2023 09:47 AM
User is offline View Users Profile Print this message


wheels496
Top-Tier Member

Posts: 218
Joined: 10/01/2008

Thanks for this. I am happy developing the script, the issue appears to be getting Dragon to recognise the command.

Is there any reason why Dragon would recognise a command when it begins with a word rather than a list. For example [David], instead of []?

Yes what I am doing should be straightforward however eventually I want to develop it so I can press a combination of the modifier keys while still having to say less, or at least something easier from my speech, than for example [Press control alt golf].

Thanks

-------------------------

DP 16

 05/18/2023 01:06 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4615
Joined: 12/08/2007

Please copy the entire list, and paste it into the forum.

Also, I know you're experimenting with different names for this script, so let us know its current name.

There's no reason you can't start a command name with a list, although I try to avoid doing so. I find scripts are more reliable when I choose a unique, easy-to-remember, easy-to-say first word, e.g., squeeze <my-list> or slide over <my-other-list>.
 05/25/2023 12:18 AM
User is offline View Users Profile Print this message

Author Icon
missink
Power Member

Posts: 62
Joined: 03/28/2015

wheels496, I have now experienced a similar problem, although with a totally different list. One member of a list persistently stopped being recognised in commands. It worked just once when I deleted it and added it again, and then it stopped being recognised again. Two different commands were affected, "list [list]" and "brace [list]".

The problem went away when I created a new profile and imported my old commands in XML format. I did try restarting Windows first, but that didn't help. I am on Dragon 15.61.

I hope you found a similar solution and were not discouraged by our inability to help. In hindsight, I suppose this is not unlike my problems with vocabulary items sometimes going away and refusing to be added again, which is also only solvable by making a new profile.



 05/25/2023 03:40 AM
User is offline View Users Profile Print this message


wheels496
Top-Tier Member

Posts: 218
Joined: 10/01/2008

It looks like it is working again-although admittedly I have not been able to do much work (always a balance between doing my work and developing Dragon to make it easier). I may well have time to work on this today

-------------------------

DP 16

Statistics
32617 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 2 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 129 guests browsing this forum, which makes a total of 131 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2023 FuseTalk™ Inc. All rights reserved.