![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Quickly change user profile between two languages Topic Summary: by voice command Created On: 09/19/2019 04:31 AM Status: Post and Reply |
|
![]() |
![]() |
- GregBau | - 09/19/2019 04:31 AM |
![]() |
![]() |
- R. Wilke | - 09/19/2019 03:07 PM |
![]() |
![]() |
- GregBau | - 09/20/2019 03:47 AM |
![]() |
![]() |
- Lunis Orcutt | - 09/20/2019 04:37 PM |
![]() |
![]() |
- Inga | - 04/26/2022 09:30 PM |
![]() |
![]() |
- R. Wilke | - 04/27/2022 03:47 AM |
![]() |
![]() |
- Inga | - 05/01/2022 06:14 PM |
![]() |
![]() |
- Inga | - 05/01/2022 06:25 PM |
![]() |
![]() |
- R. Wilke | - 05/01/2022 06:56 PM |
![]() |
![]() |
- R. Wilke | - 09/21/2019 02:25 AM |
![]() |
![]() |
- GregBau | - 09/21/2019 06:17 AM |
![]() |
![]() |
- R. Wilke | - 09/21/2019 06:46 AM |
![]() |
|
Hi forum,
there is this global command "[open] [the] recent user profile" which is useful to switch back to the previous language, particularly when using exactly two languages.
For some reason and when I'm in a hurry, I can never remember the exact wording of that command, all the more since it is of course different in my two languages.
Is there a way to assign a custom command wording to that command, and preferably the same wording in both languages I use – for example a custom fantasy word that Dragon would recognize in both languages?
What's more, can I create a single command that does the following two things:
Thanks for any ideas how to accomplish this. |
|
|
|
![]() |
|
Here is an Advanced Script accomplishing this, assuming that you have a UK English user profile, and a German user profile, and you want to switch back and forth between them:
Dim eng As New DgnEngineControl If eng.SpeakerLanguage(eng.Speaker) = dgnlangUKEnglish Then HeardWord "normal", "mode", "on" HeardWord "recent", "user", "profile" ElseIf eng.SpeakerLanguage(eng.Speaker) = dgnlangGerman Then HeardWord "Standardmodus", "starten" HeardWord "letztes", "Benutzerprofil" Else MsgBox "The current language is not supported in this script" End If I have called the script "switcher" both in English and in German, and tested it in both languages. -------------------------
|
|
|
|
![]() |
|
That's awesome Ruediger. This worked instantly in both languages. However, it seems that the command is only recognized when I'm not in Dictation Mode. So is there a way to specify that this is a "command" to be recognized also in Dictation Mode, in a similar way the "enable recognition mode switching commands" also work in Dictation Mode? On the other hand, if there should be no way to add such "Global²" commands, probably the lines - HeardWord "normal", "mode", "on" could be removed from the script, correct? |
|
|
|
![]() |
|
The answer is no because the point of Dragon including Dictation Mode is to disable all but Dictation Commands from deploying. An example of a dictation command is new line. You only have very limited vocabulary command options which will not help in your situation.
When Dragon is in Dictation Mode, the only commands you can utilize are switch to normal mode ect... You can optionally create a HeardWord script but you can't use it because you are prevented from deploying commands. This is the entire point of Dictation Mode. Unless you have a compelling reason to limit Dragon to Dictation Mode, we recommend using Normal Mode. Your only other option would be to say switch to command mode or switch to normal mode, deploy your command and then say switch to dictation mode.
------------------------- Change "No" to "Know" w/KnowBrainer 2020 |
|
|
|
![]() |
|
I am new to scripting, could you tell me how to exactly implement this script? I also need to switch between UK/International English and German and vice versa.
thanks a lot! Inge
|
|
|
|
![]() |
|
I am new to scripting, could you tell me how to exactly implement this script? I also need to switch between UK/International English and German and vice versa.
thanks a lot!
Inge
Hi,
Is it Inge or Inga? - Anyway, if you are referring to the script that I posted above, for example, on the Dragon bar in an English user profile, and assuming that the menus are the same in the version that both you and I use (DPG 15.71 as far as I am concerned), go to "Tools - Command Center - Add New Command", which will open the "MyCommands Editor".
Enter a "MyCommand Name" of your choice. As pointed out, if you want the script to automate switching back and forth between English and German user profiles, I suggest "switcher" as command name, because it is recognised easily in both languages.
Next, go to the drop-down list under "Command Type", and select "Advanced Scripting" from the list. Doing so will populate the editor below, and already paste "Sub Main" and "End Sub" into the box. They are the goalposts where the ball needs to go in, so to speak.
Then all you have to do is to copy and paste the lines posted above between the "posts" and save the script.
For this particular purpose, you need to repeat the process also for the second language your are using. If it is German, the steps are all the same, and so is the code, since there is no "German" coding for that matter.
As far as the code, and if you are new to it, don't bother understanding what it is all about, just run it and be happy with it.
Hope this helps.
-------------------------
|
|
|
|
![]() |
|
Hi, it's Inga with an A, but Dragon occasionally mistypes this – I should probably retrain it better to properly spell my name! I shall try implementing the script and will feedback whether it works. I faffed around with the command editor bit, but I must have done something wrong last time. let's see if I'm in luck this time. Do I need to do anything differently , such as needing to indicate whether I'm using the Austrian, Swiss, or Germany German user profile, given that your script does distinguish between UK and US English? |
|
|
|
![]() |
|
Hi Rüdiger, thanks a lot for your reply! Can you tell me what I'm supposed to put in group, availability, object, and process? And does the way I've put it into the command editor look correct to you? Because at the moment, once I press save, the program tells me to correct syntax errors, but I'm not sure what exactly the syntax error is in the way that I've done it, because I just copied the script you posted above. Maybe I have to select something else in group, availability, object, or process? Currently, this is when using the English user profile, I haven't done it for the German profile yet, because it didn't let me save this one. any ideas what the issue is? Thanks in advance! |
|
|
|
![]() |
|
Hi Inga,
To admit, I haven't run the script since I posted it back then, but it should still work "as is". Perhaps you should try deleting anything before "Sub Main", as those parts didn't exist at that time and have become known for causing older scripts to fail if they are around.
Alles so ein neumodischer Kram! -------------------------
|
|
|
|
![]() |
|
Sorry, Greg, but I missed the point of commands not being available in dictation mode, and I missed it because I use "normal mode" throughout. As Lunis already pointed out, the only commands available in dictation mode are the switching mode commands, given that the option is activated as per your screenshot. Unfortunately, you can't even force command recognition by pressing and holding the control key, when in dictation mode, also, if my additional testing was correct. -------------------------
|
|
|
|
![]() |
|
Okay thanks guys. So I suppose there is no way to hack ONE additional command into Dictation Mode?
Alternatively, is there any way to start an Advanced Script command other than by voice, for example by a key combination? If not, I will probably have to stick with using two voice commands instead of only one, in order to switch between the two languages I use. |
|
|
|
![]() |
|
Most likely, there is no such hack, and I wouldn't look for it anyway.
There are always ways to execute an Advanced Script, or execute code represented in the script, via a key combination, however from inside Dragon. To the best of my knowledge, some third-party utilities can do that. If I needed to do this, I would call into the script via a button assigned in the PDCC (the control software to the Philips SpeeckMike that I use), or write a stand-alone C++ executable. The big question, though, would be whether the HeardWord commands not being recognised in dictation mode can be overriden this way at all. I doubt that it can. -------------------------
|
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.