KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Dragon in virtual machine to prevent barf when stall ends?
Topic Summary: Barf containment
Created On: 03/11/2021 07:53 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Dragon in virtual machine to prevent barf when stall ends?   - Ag - 03/11/2021 07:53 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Mav - 03/12/2021 01:51 AM  
 Dragon in virtual machine to prevent barf when stall ends?   - Edgar - 03/12/2021 11:20 AM  
 Dragon in virtual machine to prevent barf when stall ends?   - Ag - 04/02/2021 06:10 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Edgar - 04/03/2021 12:20 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Mav - 04/06/2021 02:28 AM  
 Dragon in virtual machine to prevent barf when stall ends?   - PG LTU - 03/12/2021 12:29 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Mav - 03/16/2021 03:15 AM  
 Dragon in virtual machine to prevent barf when stall ends?   - Ag - 03/17/2021 04:36 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Mav - 03/18/2021 05:20 AM  
 Dragon in virtual machine to prevent barf when stall ends?   - dtea - 03/18/2021 08:02 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Ag - 04/02/2021 06:04 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Edgar - 04/03/2021 12:16 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - jolly - 08/10/2021 04:43 PM  
 Dragon in virtual machine to prevent barf when stall ends?   - Edgar - 08/11/2021 10:34 AM  
 Dragon in virtual machine to prevent barf when stall ends?   - Steve Morris - 08/12/2021 07:19 PM  
Keyword
 03/11/2021 07:53 PM
User is offline View Users Profile Print this message

Author Icon
Ag
Top-Tier Member

Posts: 641
Joined: 07/08/2019

---+ Short

if I run Dragon inside a guest virtual machine, and Dragon stalls in the well-known way such that it barfs up a lot of queued up output when the stall clears, is the barf constrained to the virtual machine? I.e. can I switch outside of the Dragon guest and do non-Dragon work, without fear of barf?

 

---+ Detail

I used to have lots ofDragon related  stall, and suffered greatly either from Dragon barfing up queued data when the stall cleared, or by having to find something to do on another PC or non-computer when Dragon installed.

 

I am having far fewer stalls nowadays :-) --- something I will post about when my setup is clean enough that the blame the user critics on this forum will have less to object to. ;-}

 

But I used to have lots of stalls. And I just suffered a minor stall of a few minutes after coming back from a meeting.  in this case Dragon's microphone was off, I think I took it off manually, although my timeout script is working pretty well and might have done it for me. I turned the microphone back on,  Dragon bar button changing from red to green, but it took a few minutes before speech started going through the system. And when it did, as usual, quite a bit of that speech was barfed up into whatever window was currently active. Nothing too bad, because I have learned to be very careful when Dragon is stalled. In this case I was just clicking around trying to find out of my microphone was dead. But I still had a chunk of barf.

 

(one of the bad things about Dragon barf after stalls is that I am often tempted to do nothing for a few minutes, rather than immediately investigating whether my microphone has somehow been disconnected, e.g. the Nvidia noise filtering software I use itself hung.)

 

In an earlier post I asked if there was any way to flush the Dragon queues - to get rid of queued up stuff, rather than waiting for it to get uninstalled and barfed up.  At least one other user also wished for the same thing.

 

But it sure would be nice to be able to get some work done using typing, while waiting for Dragon to unstall.  of course, if I switched to another PC I could get work done on that while waiting for Dragon to install. I've done that in the past, but it's a hassle, my setup with four monitors does not lend itself to KVM switches, and experience has been that I often switch away from the stalled machine and don't go back to it for a very long time.

 

This might be a [another] good reason to run Dragon in a virtual machine.

 

Have a virtual machine outside the doesn't receive any Dragon input. That should be safe. So if Dragon stalls, I can guarantee that work outside will not get messed up.

 

I think you can do this with a host operating system running two different guests, one with Dragon, and one without. The keyboard and mouse would undoubtedly be shared between the guests, but I could probably lock the microphone to the Dragon guests, and I would hope that Dragon's SendKeys only writes the guests that it is within. Otherwise it would be a virtualization hole.  or, I suppose, with Dragon inside a guest and the non-Dragon work being done in the host. In either case, we certainly do not want Dragon or apps in the Dragon virtual machine to steal focus. IMHO dealing focus should be a crime!

 

I suppose if the sound-in-out device could be switched between guests, I would even be able to continue speaking. I actually do that to some extent, using a second PC and an old Dragon license in a different room. same hassles as with the KVM.

 

the nice thing about using Dragon restricted to a guest like this is that the two guests or the Dragon guest and the host can share filesystems. That's how I used to run parallels/Windows on my Mac. It's the "I use virtual machines not for security but to enable different operating systems and software configurations accessing the same data" model of virtualization.

 

---

 

my usual questions: is anybody doing anything like this? I know that some of you (Edgar?) are using Dragon inside virtual machines, and I have been meaning to do so to reduce the uninstall/reinstall work when migrating license software to a new physical PC. This barf containment just gives me another reason to do so. Unfortunately, parallels is the only virtual machine system I have found that does a really good job of sharing the entire desktop.

 

 



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

DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design.



 03/12/2021 01:51 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 426
Joined: 10/02/2008

I've been using Dragon in virtualized environments a lot and think your train of thought derails because of VM interaction.

Sure, you can have Dragon running in a VM and if you're careful with your audio redirection you can get good results as well.

From your description it seems as if you expect to run Dragon in a VM and only contain Dragon's hiccups to that machine, but Dragon is running INSIDE the VM, so anything you dictate will also be written to an application INSIDE the VM.

If Dragon burfs, the application supposed to receive the recognized text will also be affected.

 

TBH, I don't understand why you're patient enough to wait for "several minutes" for Dragon to regain its composure.

I've created a simple batch file named KillDragon that shoots down natspeak.exe, dgnuiasvr.exe, dgnuiasvr_x64.exe, dragonbar.exe and dgnria_nmhost.exe using taskkill all in one go.

If Dragon misbehaves I pull the trigger, reload Dragon and am up and running with an empty audio queue in a matter of seconds.

 

hth,

mav

 

 

 03/12/2021 11:20 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1183
Joined: 04/03/2009

Originally posted by: Ag I know that some of you (Edgar?) are using Dragon inside virtual machines

Not by my definition of "virtual machine". I occasionally see Dragon® going off into Never-Never-Land but, like Mav I am way too impatient - I used to give it as much as 30 seconds, then 15 seconds now I am down to about five seconds before I pull the trigger…

 

Originally posted by: Mav I've created a simple batch file named KillDragon that shoots down natspeak.exe, dgnuiasvr.exe, dgnuiasvr_x64.exe, dragonbar.exe and dgnria_nmhost.exe using taskkill all in one go.

I started with a similar simple batch file (strangely enough mine has the same name <grin>). I now use a compiled C# application which does exactly the same thing. I think Rob has an applet in SP (Pro?) which also does this task but has the added benefit of cleaning up the ghost icons on the taskbar.



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

-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

 04/02/2021 06:10 PM
User is offline View Users Profile Print this message

Author Icon
Ag
Top-Tier Member

Posts: 641
Joined: 07/08/2019

Originally posted by: Mav TBH, I don't understand why you're patient enough to wait for "several minutes" for Dragon to regain its composure.

 

In another post today I summarize a recurring conversation between myself and Lunis:

 

--- Ag: my Dragon profile gets corrupt; Lunis: mine doesn't, you should not autosave, use KB command 'Close Dragon and KnowBrainer'; Ag: obedient to your FAQ, I do not autosave, I use 'Close Dragon and KnowBrainer' when I can, but it often hangs, so then I resort to Kill_Dragon.bat or rebooting or ...; Lunis: don't kill Dragon, that can corrupt your profile, I almost never have problems...

 

@Mav: any comments on the "killing Dragon can corrupt your profile" part of the received wisdom?

 

Obviously, if Dragon stalls in the middle of Save User Profile and is killed, that might corrupt your profile. (1980s software.)

 

How about at other times?  Does Dragon do any writes in the background, not just at Save Profile time, that might produce a corrupted profile?

 

 

 

 

 



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

DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design.

 04/03/2021 12:20 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1183
Joined: 04/03/2009

Originally posted by: Ag  Does Dragon do any writes in the background, not just at Save Profile time, that might produce a corrupted profile?

The obvious when… You close the Command Editor, Vocabulary Editor or any of the Options dialogs. Don't forget our recent conversation on paging; I suspect that a user profile might be large enough to get paged or partially paged.



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

-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

 04/06/2021 02:28 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 426
Joined: 10/02/2008

@ag: From what I've experienced, a Dragon profile only gets corrupted if Dragon cannot complete the process of saving the profile.

Most of the time it was because Dragon didn't shut down properly and people shut down their machine without making sure Dragon was off.

During shutdown, Dragon would start saving the profile but would get killed by Windows in the process. Voila - corrupted profile.

But virtually all of these cases could be fixed by simply copying over the backup.

The very few cases where this didn't work somehow managed to get their profile corrupted in a way that would not be apparent during save and thus got copied to the backup, but those cases were incredibly rare.

One single occasion had a damaged base model (in the ProgramData\Nuance\...\data folder), but that probably was a hardware and/or file system error.

 

Regards,

mav

 03/12/2021 12:29 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2165
Joined: 03/21/2007

I'm curious if instead of killing the Dragon, can you get a similar result by closing, then re-opening the profile?

This works as a command in advanced scripting to do just that, but if Dragon is hanging, I'm not sure how she gets to the utterance comprising your command:

'#Language "WWB-COM"
Option Explicit
Sub Main
    Dim sp, top As String
    sp=EngineControl.Speaker
    top=EngineControl.Topic
    EngineControl.SpeakerClose
    EngineControl.SpeakerTopicSelect(sp, top)
End Sub



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




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.



 03/16/2021 03:15 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 426
Joined: 10/02/2008

In case of Dragon hanging, trying to access it from within itself usually doesn't work.

In order to load a new user profile, the previous one has to be unloaded.

This doesn't work as long as it is being used for dictation, which - from Dragon's point of view - exactly is what's happening while it is waiting for a recognition result to be handled by a target window.

 

Usually you don't get an answer from the call to close the speaker profile for 20 seconds and then an error that the profile cannot be removed from memory.

 

Regards,

mav

 03/17/2021 04:36 PM
User is offline View Users Profile Print this message

Author Icon
Ag
Top-Tier Member

Posts: 641
Joined: 07/08/2019

@mav: how do you know the Dragon is waiting for the results to be handled by the target window? If the last thing you said displays in the results box, then that is reasonable, but often the result box displays some thing from 30 seconds or so earlier. (On occasion I have tried to recite several minutes of text while dragging install, to see how deep the cues are.)

It is a reasonable thing to assume, queues full and all that, but it could be the queue between dragon and the target window or the queue between the sound driver or knowbrainer and dragon.

on UNIX I would be looking for a wait channel. I could swear I have seen such in windows, but I was not able to find it. At least not using my tool of choice, process explorer and the rest of sysutils. But my windows Fu is not very strong.

probably a clue that most often dragon is spinning, occupying 50 to 100% of the CPU as reported by task manager. This might suggest that The last parameter to send keys produces a polling loop :-(

But from time to time I see knowbrainer as the high CPU user. Although the process explorer documentation says that attribution of CPU time is often inaccurate.

If you know white dragon log messages tell you who is spinning and who is not, please share. More often than not you see a message when something stops or times out. From time to time I grab those, and if I see a high frequency of souls greater than 10 seconds, I create a new profile. Some of the log entries suggest what the problem is, but often I do not understand

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

DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design.

 03/18/2021 05:20 AM
User is offline View Users Profile Print this message

Author Icon
Mav
Top-Tier Member

Posts: 426
Joined: 10/02/2008

For each target window you want dictated text to appear in, Dragon has to have an event sink registered for this window.
With COM on Windows, registering such a NotifySink to handle events is pretty standard, but Dragon does not handle errors in these NotifySinks very well.

When you try to shutdown Dragon, the speaker has to be unloaded and for that to work, all registered NotifySinks must be unregistered first.
If this process fails because one of the NotifySinks died or hangs, you cannot unload the speaker and thus are unable to shut down Dragon gracefully.

I think log entries like this one
2020-12-17|15:09:26.781|COMPBASE|10892|·3184|I|[x64]·threadWindowProc·Message·[1501]·processing·took·too·long·9813·ms
point to Dragon not being able to communicate with the notifySink in the other process.

 03/18/2021 08:02 PM
User is offline View Users Profile Print this message


dtea
New Member

Posts: 19
Joined: 12/06/2010

I've just started wrestling with the stall-barf pattern in DPI 15.61. I've found a solution.

I shut down a stall by turning off my mic. Dragon then does a short barf. 

What a PIB this is. Is a fix coming?  



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

Daniel DPI 15.61
Intel i7 3.50 GHz 16 GB
SpeechWare Travel Mic

 04/02/2021 06:04 PM
User is offline View Users Profile Print this message

Author Icon
Ag
Top-Tier Member

Posts: 641
Joined: 07/08/2019

Originally posted by: dtea I've just started wrestling with the stall-barf pattern in DPI 15.61. I've found a solution. I shut down a stall by turning off my mic. Dragon then does a short barf.

 

Where are you shutting down the mic?

 

Are you shutting down the Dragon mic ( e.g. the green or red ball in the middle of the modern DragonBar)?

 

Or the physical mic?

 

Or any of the places in between?

 

---

 

Frequently I cannot shut down the Dragon mic, not from the DragonBar.

 

Turning various places in the path from my mic to Dragon off-and-on has long been part of my debug strategy - from time to time it is the mic or driver that has stopped working, not Dragon - but I must admit that I have not been making good notes as to whether the buffered stuff is cleared by this, thereby fixing the puke problem.

 

Here are some of the places where I regularly turn my mic off:

Button on the headset

Unplug the USB wireless dongle

the NVIDIA Broadcast app - which takes input from my headset (or other sound input), applies a noise filter using the GPU, and then sends it on to Dragon. 

 

These are my regular places, because from time to time Dragon has not failed, something else has.

 

 

 

Quickly becoming one of my regular places because of its efficacy:

 

Control Panel > Sound > Recording devices > disable / reenable my sound source

 

 

Possible, but not something I regularly do: disable at various places in the USB hierarchy and/or Device Manager.  Although Device Manager is my goto when my GPU seems nopt to be working - that, and detaching/reattaching my Surface Book.

 

 

I would like to know (a) who is stalling, causing the queues to back up, and (b) whicvh queues have how much buffering.  I thought that the barf was mainly stuff that had backed up in the queues between the sound source and Dragon, while Dragon was hanging or spinning waiting for Dragon's output queues to drain, ie waiting for the recipient, the app that is reciving the input. (Or, frequently, backing up while Dragon is trying to parse menus, HTML, etc., when switching between apps.) Typically past the Windows sound driver for my headset, and past the NVIDIA noise filtering virtual device, but before the actual receiving app.  But I suppose that the entire system of buffers and queues could be backing up. Turning the non-Dragon mic off/on should not clear stuff past that moc (or perhaps their first level output queue). But its worth a try - I just like creating a mental model.

 

Moreover, sometimes I can see that stuff has been recognized, gone past the results box.  But sometimes it is buffered earlier.

 

 

 



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

DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design.

 04/03/2021 12:16 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1183
Joined: 04/03/2009

Just anecdotal, and not evidence... For at least 10 years I used "Kill_Dragon.bat" or a C# equivalent many times every day (20+). In that entire time I only experienced 1 corrupted user profile (just recently). Almost all of my dragon slaying has been related to Visual Studio - but not ALL. I am careful to wait at least 5 seconds after exiting Dragon® before I shut my computer off. I allow Dragon® to back up every 5 saves. I have seen a few BSoDs while Dragon® was running (unknown whether related), no more than 1 or 2 per year and these have not corrupted by profile.

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

-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

 08/10/2021 04:43 PM
User is offline View Users Profile Print this message

Author Icon
jolly
New Member

Posts: 1
Joined: 08/10/2021

Could you share the kill_dragon or C# script?

 08/11/2021 10:34 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1183
Joined: 04/03/2009

Here it is as C# (both must be run as administrator):

using System;

using System.Diagnostics;

using System.IO;

using System.Threading;

 

namespace KillDragon {

   class Program {

      static void Main(string[] args) {       // PIDs  

         EndProcessTree("KBPro.exe");       //5264  

         Thread.Sleep(2000);//sleep 2 seconds

         EndProcessTree("ProcHandler.exe");  //9864

         //EndProcessTree("KBProcHandler.exe");

         //EndProcessTree("pcbvWndProc1928.exe");

         Thread.Sleep(1000);//sleep 1 second

         EndProcessTree("dragonbar.exe");   //18008

         EndProcessTree("dgnuiasvr.exe");   //12644

         EndProcessTree("dgnuiasvr_x64.exe");  //700

         EndProcessTree("dgnsvc.exe");      //10500

         EndProcessTree("natspeak.exe");     //18088    

         //EndProcessTree("formfiller.exe");      

         //EndProcessTree("dgnria_nmhost.exe");

         //EndProcessTree("nsbrowse.exe");

         //the commented out trees are from older versions and helpers

      }

 

      private static void EndProcessTree(string imageName) {

         Process.Start(new ProcessStartInfo {

            FileName = "taskkill",

            Arguments = $"/im {imageName} /f /t",

            CreateNoWindow = true,

            UseShellExecute = false

         }).WaitForExit();

      }   

   }

}

here it is as a batch file:
@echo off
taskkill /IM dgnria_nmhost.exe /F /T
taskkill /IM nsbrowse.exe /F /T
taskkill /IM dragonbar.exe /F /T
taskkill /IM dgnuiasvr.exe /F /T
taskkill /IM dgnuiasvr_x64.exe /F /T
taskkill /IM formfiller.exe /F /T
taskkill /IM natspeak.exe /F /T
taskkill /IM KBProcHandler.exe /F /T
taskkill /IM KBPro.exe /F /T
taskkill /IM pcbvWndProc1928.exe /F /T
taskkill /IM ProcHandler.exe /F /T


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

-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

 08/12/2021 07:19 PM
User is offline View Users Profile Print this message

Author Icon
Steve Morris
Top-Tier Member

Posts: 217
Joined: 07/22/2007

These are my favourite kinds of discussion on this forum. All too rare. The amount of insights, and intelligent ideas and workarounds are excellent. I have learned more from this forum than Nuance. Thanks everyone.

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

 


 


Steve 

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

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