KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: user input in vocal with a dialog box
Topic Summary:
Created On: 12/16/2020 05:45 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 user input in vocal with a dialog box   - dougransom - 12/16/2020 05:45 PM  
 user input in vocal with a dialog box   - mdl - 12/21/2020 02:42 PM  
 user input in vocal with a dialog box   - dougransom - 02/10/2021 08:11 PM  
Keyword
 12/16/2020 05:45 PM
User is offline View Users Profile Print this message

Author Icon
dougransom
Power Member

Posts: 47
Joined: 03/02/2017

I have this command I used to dial the phone, in Dragon scripting, that I wish to replace with a vocola script.  I'm not sure how to collect the user input is or might dictate their phone number into the dialogue box. I often find I need to correct phone number, either verbally or with typing,hence the requirement for a dialogue box.

 

' This script displays a user dialog in which the ' user types or dictates a name. ' It then displays whatever the user typed in a ' message box. Sub Main Begin Dialog UserDialog 400,98,"Make a Call",.DialogFunc '%GRID:10,7,1,1 Text 20,14,220,14,"Please enter the phone number:",.Text1 TextBox 20,35,370,21,.TextBox1 OKButton 70,63,90,21 CancelButton 220,63,90,21 End Dialog Dim dlg As UserDialog result = Dialog (dlg) If result = -1 Then ' If the user clicked OK, SetMicrophone 0 ShellExecute("tel:"+dlg.TextBox1) End If End Sub Function DialogFunc%(DlgItem$, Action%, SuppValue%) Any thoughts? I am open to involving auto hotkey there is a solution that way.



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

Doug Ransom

 12/21/2020 02:42 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 838
Joined: 04/18/2009

dragon's dialogue commands can't be used from Vocola unfortunately. AutoHotkey probably works; you could probably also build something out of any standalone editor. e.g., one voice command pops up the editor; the user enters the phone number or whatever; then another command gets the contents of the editor via copy to clipboard, dismisses the editor, and then does whatever is appropriate based on the clip board contents.

Trying to use a Vocola Python extension is likely to be painful because of event loops and the like so I don't recommend that.
 02/10/2021 08:11 PM
User is offline View Users Profile Print this message

Author Icon
dougransom
Power Member

Posts: 47
Joined: 03/02/2017

I had some success with authotkey and vocola.  Here is the vocola command:

dial the phone  = {Ctrl+Alt+d};     #the ahk to dial the phone

and here is the autohotkey:

^!d:: ;dial the phone

InputBox phoneNumber, "Dial", "Phone Number:"

Run, % "tel:" . phoneNumber

return

it doesn't turn the microphone off after dial-in the phone, but I can live with the above solution.

 

 



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

Doug Ransom

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

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