![]() |
KnowBrainer Speech Recognition | ![]() |
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 |
|
![]() |
![]() |
- Edgar | - 09/01/2020 12:25 PM |
![]() |
![]() |
- Edgar | - 12/29/2021 11:51 AM |
![]() |
|||||
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. 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 |
|||||
|
|||||
![]() |
|||||
In a different thread…
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 |
|||||
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.