KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Minimal code to use DgnEngineControl
Topic Summary:
Created On: 04/29/2021 02:10 PM
Status: Post and Reply
Linear : Threading : Single : Branch
Keyword
 04/29/2021 02:10 PM
User is offline View Users Profile Print this message

Author Icon
Ag
Top-Tier Member

Posts: 647
Joined: 07/08/2019

As I report in https://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=35599#187421

I have been able to  reproduce some problems related to an interaction between using of the DgnEngineControl interface, KnowBrainer, and a "mature" profile.  [*]  however, the problem does not occur

 

I have stripped down the speech command that uses DgnEngineControl  to what I think is the minimum correct use of such an interface:

 

 

Name: Test Control
Sub Main
Dim eng As New DgnEngineControl
eng.Register(0)
eng.UnRegister(False)
Set eng = Nothing
End Sub

 

For that matter, I have also tried stripping it down even further

 

Name: Test Control
Sub Main
Dim eng As New DgnEngineControl
eng.Register(0)
'eng.UnRegister(False)
'Set eng = Nothing
End Sub

 

 

It is remarkable how many minor variants of the above one sees on these forums. Sometimes no argument is passed to register, sometimes an argument is. Etc.   frequently people do not bother to un-register or clear the object. Occasionally people do not bother to register.

 

Q:  what is the  minimum correct connection to and disconnection from the DgnEngineControl interface?

 

...  in the interests of eliminating something simple like that as a possible cause of the issue reported in the link.

 

---

 

Note *:  the problem only occurs when I  execute  a command using DgnEngineControl as above,  running KnowBrainer and Dragon, on a mature profile.  it does not occur when I am running Dragon without KnowBrainer.   it does not occur when I am running KnowBrainer and Dragon on a completely fresh profile.

The problem manifests itself as extremely slow times to open  a profile, frequently exceeding 5 to 7 minutes.  See  the link for more details:  https://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=35599#187421

 

 



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

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/29/2021 02:58 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 3831
Joined: 01/14/2008

Originally posted by: Ag  

 

 

It is remarkable how many minor variants of the above one sees on these forums. Sometimes no argument is passed to register, sometimes an argument is. Etc.   frequently people do not bother to un-register or clear the object. Occasionally people do not bother to register.

 

 

 

Q:  what is the  minimum correct connection to and disconnection from the DgnEngineControl interface?

 

 

Sub Main
    MsgBox EngineControl.Speaker
End Sub

no instantiation, no registering, no tidying up required. Registering connects the Dragon engine control to the speech engine which is not necessary for many methods and properties like "Speaker", register options, displaying the UI dialogues…

 

Read the API which can be found at:

 

"C:\Program Files (x86)\Nuance\NaturallySpeaking15\Help\dnsapi.chm"



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



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

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