KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Offering: Cory J - Correct That
Topic Summary: A replacement for Nuance's "Correct That" dialog
Created On: 09/01/2020 12:25 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Offering: Cory J - Correct That   - Edgar - 09/01/2020 12:25 PM  
 Offering: Cory J - Correct That   - Edgar - 12/29/2021 11:51 AM  
Keyword
 09/01/2020 12:25 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1260
Joined: 04/03/2009

31 August 2020 THIS IS A FIRST LOOK - most functionality is working. I'm still struggling with the layout to make it both font-sensitive and easy to use - it works fine at default settings. With extremely large fonts on low resolution monitors it is impossible to avoid having scrollbars; this is also a problem if the user resizes the window (this goes for the primary Correct That window and all the dialogs). If you make a lot of major changes to the GUI (font sizing, localization, window sizing etc.) and things get irretrievably ugly don't hesitate to reset the application to defaults (there is a button on the Preferences dialog and you can delete the Settings folder.

I've attached two files: a Readme text file with all the details and directions; a zipped file which contains just the application and its text files.

The Microsoft Visual Studio 2017 Solution can be downloaded here:

https://www.dropbox.com/s/5q6xsbshwh7bmez/CorrectThat0.1betaSolution.zip?dl=0

[EDIT 2 September 2020] I just found a minor bug - only about half the localized strings will be updated <frown>. A trivial fix - will get on it tomorrow…






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

-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



 12/29/2021 11:51 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1260
Joined: 04/03/2009

In a different thread…

Originally posted by: Robert Snow Would it be possable to get a line by line explanation. I'm trying to learn all the code. What is the purpose of the code? Some of the things that are mystifying to me, actually all of it. What is being accomplished in the difference sets of data.

 

Example: Dim recognized As String

 

Sub Main
   Dim recognized As String

   Clipboard ("")' clear the clipboard
   SendKeys "^c", 1
   Wait 0.4
   recognized = Clipboard
   Wait 0.4
   If recognized = "" Then
      Dim EngineControl As New DgnEngineControl
      EngineControl.DlgShow(dgndlgRecognitionHistory,0,,0)

      Wait 0.5
'Copy the the second to last uttered item in the recognition history box to the clipboard
      SendKeys "{Up}{Tab}", 1
      SendKeys "^c", 1
      Wait 0.4
'Close the recognition history window
      SendKeys "{Esc}"
      recognized = Trim(Clipboard$()) 'Recognition history window adds one space to the end of everything
      recognized = "XXXFromRecognitionHistoryXXX " & recognized
      Wait 0.4
   End If
   ' ShellExecute "D:\CorrectThat\CorrectThat\bin\Release\CorrectThat.exe " & recognized
   ShellExecute "Z:\CoryJ\CorrectThat.exe " & recognized
End Sub

just to be on the safe side, here's my current version of the Command with added comments:

 

Sub Main

   Dim recognized As String' create (dimension) a string variable

 

   Clipboard ("")' clear the clipboard because we are going to use this to test later

   SendKeys "^c", 1' send the current selection to the clipboard

   Wait 0.4' sending to, or retrieving, from the clipboard requires waiting briefly thereafter on my system

   recognized = Clipboard' put the content of the clipboard into the previously created string variable

   Wait 0.4' clipboard operations require a brief wait afterward

   If recognized = "" Then' if the clipboard is still clearthen nothing was selected

      Dim EngineControl As New DgnEngineControl' create a new DgnEngineControl type variable

      EngineControl.DlgShow(dgndlgRecognitionHistory,0,,0)' show the Recognition History dialog

 

      Wait 0.5' give the Recognition History Dialog time to load and display

'Copy the the second to last uttered item in the recognition history box to the clipboard

      SendKeys "{Up}{Tab}", 1

      sendKeys "^c", 1

      Wait 0.4

'Close the recognition history window

      SendKeys "{Esc}"

      recognized = Trim(Clipboard$()) 'Recognition history window adds one space to the end of everything

' Add something unique to the beginning of what was recognized

' so that CorrectThat.exe knows to parse it from the command line

      recognized = "XXXFromRecognitionHistoryXXX " & recognized

      Wait 0.4

   End If

' CorrectThat.exe is an application that Edgar (I) wrotewhich replaces Dragon®’s Correction Dialog

' execute it from the CLI with a parameter consisting of the modified recognized term:

   ShellExecute "Z:\CoryJ\CorrectThat.exe " & recognized

End Sub


 



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

-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

Statistics
32285 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 386 guests browsing this forum, which makes a total of 386 users using this forum.

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