![]() |
KnowBrainer Speech Recognition | ![]() |
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 |
|
![]() |
![]() |
- Edgar | - 08/25/2020 01:42 PM |
![]() |
|||
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.
------------------------- -Edgar |
|||
|
FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.