KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Alias in list, is it possible ?
Topic Summary:
Created On: 09/07/2020 02:44 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Alias in list, is it possible ?   - Tengu - 09/07/2020 02:44 PM  
 Alias in list, is it possible ?   - Matt_Chambers - 09/07/2020 02:48 PM  
 Alias in list, is it possible ?   - Alan Cantor - 09/08/2020 11:51 AM  
 Alias in list, is it possible ?   - Matt_Chambers - 09/08/2020 05:07 PM  
 Alias in list, is it possible ?   - wheels496 - 10/09/2020 10:05 AM  
 Alias in list, is it possible ?   - Mav - 10/09/2020 10:41 AM  
 Alias in list, is it possible ?   - Alan Cantor - 10/09/2020 12:55 PM  
 Alias in list, is it possible ?   - wheels496 - 10/09/2020 03:22 PM  
 Alias in list, is it possible ?   - PG LTU - 10/09/2020 04:07 PM  
 Alias in list, is it possible ?   - wheels496 - 10/12/2020 06:39 AM  
 Alias in list, is it possible ?   - Matt_Chambers - 10/12/2020 08:27 AM  
 Alias in list, is it possible ?   - wheels496 - 10/12/2020 09:18 AM  
 Alias in list, is it possible ?   - Mav - 10/13/2020 01:59 AM  
 Alias in list, is it possible ?   - R. Wilke - 10/13/2020 10:16 AM  
 Alias in list, is it possible ?   - Mav - 10/14/2020 01:40 AM  
 Alias in list, is it possible ?   - Edgar - 10/14/2020 10:56 AM  
 Alias in list, is it possible ?   - Mav - 10/15/2020 01:40 AM  
 Alias in list, is it possible ?   - Edgar - 10/15/2020 11:35 AM  
 Alias in list, is it possible ?   - Mav - 10/16/2020 03:01 AM  
Keyword
 09/07/2020 02:44 PM
User is offline View Users Profile Print this message

Author Icon
Tengu
New Member

Posts: 4
Joined: 07/16/2020

Good evening ladies and gentlemen,

Do you know if it's possible to do lists with alias like: <moreOrLess>

"""

less

less expansive As less

less 'something' As less

'other_1' As less

more

more expansive As more

more 'something' As more

'other_2' As more

"""

Like that the list 'return' only 2 values: 'more' or 'less'…

 

Thank you in advance.

 09/07/2020 02:48 PM
User is online View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 271
Joined: 08/09/2018

Yes, it's quite simple. Many of my commands use this technique. You need to do a "complex" list with a written form/spoken form structure, so that your List items would include things like:

less expansive\less
less something\less
less
more
more expansive\more

And then include these lines in your command to extract only the written form of the item:

x = ListVar1
If InStr(x,"\") Then x = Left(x,InStr(x,"\")-1)

Hope this helps.

Matt
 09/08/2020 11:51 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3869
Joined: 12/08/2007

I use a slight variation of Matt's technique. When constructing a complex list, I use a written form\spoken form for every item:

less expansive\less
less something\less
less\less
more\more
more expansive\more

Setting up lists this way eliminates the need for the If statement:

x = ListVar1
x = Left(x,InStr(x,"\")-1)

But either way is good!
 09/08/2020 05:07 PM
User is online View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 271
Joined: 08/09/2018

Yes, either way is good, and I probably have examples of both techniques in my custom commands.
 10/09/2020 10:05 AM
User is offline View Users Profile Print this message


wheels496
Senior Member

Posts: 90
Joined: 10/01/2008

I was trying this but did not get it to work! What I'm trying to do is slightly different.

I am building a command, with a list, that will press a key combination and number of times (to go between sections that I am using) [yes the 1st command will be a mouseclick so that it all starts from the same section].

My list will be something like:-
designer
fields
file
filter
pages
save
toolbar
visualisation

Obviously, I could use an IF or SELECT CASE statement to determine what was said and generate the necessary keystrokes. However, I do dramatically reduce the code if I could specify a numeric alias, for example:-
designer\0
pages\1

But this did not appear to work, or is there a different way to pick up the alias?

Thanks

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

DPI 15.6.1

 10/09/2020 10:41 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 233
Joined: 10/02/2008

Hi!

I think it's because you mixed up spoken and written form.

 

What you SAY has to be put AFTER the backslash.

What you want Dragon to WRITE must be put IN FRONT OF the backslash.

 

That way you can introduce several different spoken forms for the same written form.

 

One popular use for this in German is:

2\Zwei

2\Zwo

for example.

 

hth,

mav

 10/09/2020 12:55 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3869
Joined: 12/08/2007

Since your commands sends keystrokes, could you do something like this with the list?

{Down 25}\first item
{^End}{Up 25}\second item
{F5}fields{Enter}{Esc}\third item

Sub Main
Dim x As String
x = Mid(ListVar1, 1, Instr(ListVar1, "\")-1)
SendKeys x
...
 10/09/2020 03:22 PM
User is offline View Users Profile Print this message


wheels496
Senior Member

Posts: 90
Joined: 10/01/2008

I am now on my home PC, so do not have access to the command I was working on on my employers PC. However, I quickly a test command on my home PC. The test list is:-

1\Willows
2\boots
3\Marks & Spencer

Now I am able to say only the spoken form, however, when I display the contents of ListVar1, it displays all of it and not just a number. Am I missing something?

If I need to use get the value by using string manipulation functions-I know how to do that but I just want to check that the scripting language does not have a function to extract the written form only?

Thanks

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

DPI 15.6.1

 10/09/2020 04:07 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2097
Joined: 03/21/2007

Sure. There is a generalized form here: http://bit.ly/uber-complex

Otherwise, Alan already told you how just above using "Mid" (though he also used "Left" in his earlier implementation).  And see below.

 

 

 

Btw, you folks using mixed complex lists might want to access your variables as follows (no more "if statement" required):

 

Left(ListVar1,InStr(ListVar1+"\","\")-1)



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




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.



 10/12/2020 06:39 AM
User is offline View Users Profile Print this message


wheels496
Senior Member

Posts: 90
Joined: 10/01/2008

I am now confused! I have the following list:-

1\designer
2\fields *
3\file *
4\filters
5\pages
6\save icon
7\toolbar *
8\visualisations

I do not know why but Dragon does not recognise that items marked with an Asterix. It is important to also note that all these items are recognised, once I remove aliases.

Unfortunately given the time I have wasted on this, I have decided to go back to my original idea-namely don't use aliases and use a case command.

Can anyone suggest why some of the permutations are not being recognised?

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

DPI 15.6.1

 10/12/2020 08:27 AM
User is online View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 271
Joined: 08/09/2018

Originally posted by: wheels496 I am now confused! I have the following list:- 1\designer 2\fields * 3\file * 4\filters 5\pages 6\save icon 7\toolbar * 8\visualisations I do not know why but Dragon does not recognise that items marked with an Asterix. It is important to also note that all these items are recognised, once I remove aliases. Unfortunately given the time I have wasted on this, I have decided to go back to my original idea-namely don't use aliases and use a case command. Can anyone suggest why some of the permutations are not being recognised?

If you're trying to add the asterisks to create a wildcard entry, that won't work.  Every spoken form in the list must be spelled out.

 10/12/2020 09:18 AM
User is offline View Users Profile Print this message


wheels496
Senior Member

Posts: 90
Joined: 10/01/2008

Apologies, the Asterix's only identified the options that Dragon refused to recognise-the Asterix is NOT part of the list variable.

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

DPI 15.6.1

 10/13/2020 01:59 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 233
Joined: 10/02/2008

Do you get any warnings/errors in your Dragon.log file?

Especially those talking about "nonacc pg"?

 

A while back I noticed a strange problem where some words could not be imported. They, too, were given a spoken form (obviously something really uncomplicated), but some of them simply could not be imported.

Nuance support found out that the pronunciation guesser wasn't able to produce a good enough pronunciation for some of the spoken forms (although we couldn't find out why exactly). Perhaps it's something similar with your words?

 

Long story short, the words could be imported into a new profile (a new vocabulary didn't suffice!), so this could be something you could try as well.

 

Create a new profile (just for testing purpose) and try your command (including the aliases) there.

Might be a bit far-fetched, but testing it shouldn't take too long.

 

hth,

mav

 10/13/2020 10:16 AM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7275
Joined: 03/04/2007

Nuance support found out that the pronunciation guesser wasn't able to produce a good enough pronunciation for some of the spoken forms (although we couldn't find out why exactly).


Just out of curiosity. Which particular words/spoken forms were they?

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



No need to buy if all you want to do is try ...

DragonCapture KB Download (Latest)
DragonCapture Homepage

 10/14/2020 01:40 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 233
Joined: 10/02/2008

I created super- and subscript numbers using these Unicode characters:

https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts

 

The spoken form consisted of "hoch" or "tief", followed by the spelled digit, for example "?\hoch sieben" or "?\tief sechs".

 

The pron guesser in this particular profile somehow choked while trying to find a pronunciation for "tief sechs", so these words could not be imported. I guess it's the same when you add a command (Dragon also has to prepare for hearing the command's spoken form) and the pron guesser fails at this task then the command won't be recognized.

 

mav

 10/14/2020 10:56 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 938
Joined: 04/03/2009

My solution to this is to ALWAYS dictate the "spoken form" and try very hard not to correct whatever Dragon enters based on what you said. With a problematical word/phrase I will open Notepad and dictate that word/phrase within the context of a longer more relevant utterance. Sometimes I will do this a couple/few times dictating the same utterance as a full sentence - not so much so that Dragon learns it but that my voice/mind stabilizes my pronunciation. I then utter the target word/phrase in Notepad to make sure that Dragon gets it right; I then create the new custom word with the target word/phrase and Dragon has never failed to get it right yet. I do the exact same thing with file/folder/link names - when renaming a file system object and Dragon gets it wrong, I use Notepad to dictate the appropriate word/phrase within the context of a larger utterance than dictate the word/phrase as standalone repeating until Dragon gets it right (I've never seen it take more than three repetitions). I then go back and rename the object with the word/phrase.

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

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 10/15/2020 01:40 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 233
Joined: 10/02/2008

Hi Edgar!

While your approach to find out what Dragon thinks you said seems to work fine, from an efficiency point of view it's a nightmare.

When you're renaming files as in your example, those files probably don't have names from your vocabulary. Otherwise you wouldn't have to add custom words for them.

Using an input method that's suited better for entering arbitrary characters in this case (i.e. simply typing the new file name) is a lot faster and you don't clutter your vocabulary with words you'll probably will use very seldomly (if at all) in the future.

The amount of effort to teach Dragon to robustly recognize this word (even with little or no context, as occurs when renaming a file) seems to be way out of proportion.

 

So unless physical disabilities keep you from using the keyboard I really cannot see why someone would use such a cumbersome way to correct a misrecognition when renaming files...

 

Regards,

mav

 

P.S.: Right after finishing this post I thought we should be able to automize this way of adding words fairly easily, so that you don't have to open Notepad and copy text around.

Basically all you need is a Dragon-friendly editor window and a little help from the VocTools API...



 10/15/2020 11:35 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 938
Joined: 04/03/2009

Originally posted by: Mav … from an efficiency point of view it's a nightmare

 

So unless physical disabilities keep you from using the keyboard

You are right - it is a bit cumbersome! But, considering how infrequently one needs to add custom words with differentiated written/spoken forms (and in that instance I almost always accept whatever Dragon "thinks I said") and how infrequently one would want to name/rename a file/folder/link with an utterance Dragon doesn't like - it's really not that onerous.

I, like many of us on this forum, have physical disabilities which restricts me from using the keyboard and mouse. Personally, I seem to spend a lot of time navigating the file system; it irks me when a developer (Microsoft etc.) names files and folders with seemingly random strings of letters and numerals. Lots of times those strings are hardcoded in other applications and may not be changed; fortunately, links can always be created/renamed to gain vocal access - at least for starting/opening the filesystem object.



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

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 10/16/2020 03:01 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 233
Joined: 10/02/2008

Originally posted by: Edgar 

I, like many of us on this forum, have physical disabilities which restricts me from using the keyboard and mouse.

 

Yeah, unfortunately Nuance has never put their focus on efficient hands-free operation of everything.

On the other hand, this opened opportunities for companies and organizations to provide an additional level of support for users with special needs (although the kind of support usually is as individual as the individual person's disabilities...).

 

Regards,

mav

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

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