KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Offering: a "Correct That" dialogue replacement
Topic Summary: VERY preliminary look!
Created On: 08/25/2020 01:42 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Offering: a "Correct That" dialogue replacement   - Edgar - 08/25/2020 01:42 PM  
Keyword
 08/25/2020 01:42 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 915
Joined: 04/03/2009

25 August 2020 THIS IS A VERY PRELIMINARY LOOK - most functionality is disabled and/or untested. You CAN correct/edit the text in the "String to correct:" text field then say "click go" or use your mouse to click the "Go" button to experience the correction. In the currently attached ZIP file only the executable and a few required text files of words (dictionary.txt, Synonyms.txt, Homonyms.txt etc. are provided; they all need to stay in the same folder in a location for which Dragon and/or KnowBrainer have read/write privilege (the root of your C:\ drive is a safe bet - e.g. C:\CoryJ\ - just make sure that there are NO spaces in the fully qualified path).

 

Questionable design decision - if your script starts the application and there IS NO SELECTION the most recently uttered phrase is selected AND DELETED in the text field. Subsequently the correction dialogue opens with that phrase offered for correction; if you click the "Go" button the phrase is retyped (as potentially edited). However, if you click the "Cancel" button NOTHING is typed and the phrase remains deleted ready for you to re-dictate. Thoughts?

 

Cory J (CorrectThat.exe)

A multi-monitor aware replacement for Nuance’s Dragon utility "Correct That" which displays a sophisticated correction dialogue. It works in any text field (text editor, text entry field etc.) regardless of whether the application is "Select-and-Say" or not. If some text is selected that text is offered for correction otherwise, Dragon's most recently recognized utterance is offered for correction (obviously ignoring the utterance which brings up the dialogue). The application relies on a few text files residing in the same folder: dictionary, Synonyms, Homonyms etc. - these may be edited by the user if done so carefully (rules to be provided later). I currently have a "dictionary" file with about 100,000 entries (I also have one with fewer entries - 60,000 or so but the one provided is VERY small - fewer than 100 entries). The other files are currently far from exhaustive but more substantial than the 100 entry dictionary file.

 

The application stores its settings in a folder under this folder:

C:\Users\<Username>\AppData\Local\CorrectThat\

 

One script (either Dragon or KnowBrainer) will need to be created; a global script (I use the name "Cory J" so that it does not conflict with the built-in Dragon functionality and because it is evocative of "correct that" in another language):

Sub Main

   Dim recognized As String

   Dim phraseWords() As String

 

   Clipboard ("")' clear the clipboard

   SendKeys "^c", 1

   Wait 0.4

   recognized = Clipboard

   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}"

      'Wait 0.5  'Needed for script stability

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

      Wait 0.4

      phraseWords = Split(recognized, " ")

      For i = 0 To UBound(phraseWords)

         SendKeys "+^{Left}", 1

      Next

      SendKeys "{Delete}", 1' this is the "questionable" design decision

   End If

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

End Sub

 

For this script the exact fully qualified path will depend on where you place the application executable. 

 

The application has a single "Tools" menu (accelerator key = t) [unfinished…]

 

The "Preferences…" menu item brings up a preferences dialog [unfinished…]

 

The "About Correct That…" menu item brings up a traditional About dialog with details including the version number.

 

There is a panel of buttons (Vocabulary […] SpeakOs) - each button causes the appropriate word list text file to be opened in your preferred text editor. Any edits you make here will NOT take effect until the next time the dialogue opens.



CoryJ0.0alpha.zip
CoryJ0.0alpha.zip  (177 KB)



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

-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
31791 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 653 guests browsing this forum, which makes a total of 656 users using this forum.

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