Great, It was good to find the error anyway. I will add some mroe try/catch conditions to the code to make it fail more elegantly in the next release.
Cheers for the info.
Printable View
Great, It was good to find the error anyway. I will add some mroe try/catch conditions to the code to make it fail more elegantly in the next release.
Cheers for the info.
OK, I'm pretty dumb. How do I add more commands?
Click the Setup... button then choose your vocab file by clicking on "Click to load file...", should be somethiing like: "C:\Program Files\SpeakEasy\Vocab\map.ini"Quote:
Originally Posted by Laidback
You should then see a screen like this:
http://img285.echo.cx/img285/1146/sp...movocab0tr.jpg
On the left are the commands already there. Commands are grouped into a parent phrase like MUSIC or MAP and under each parent is a child command like PLAY or STOP. Click on the parents to see all the grouped children. Once you choose a child the center panel fills with that data.
The Voice you'll eventually say is "MAP MENU", the two input boxes in the top center. You can choose the group from the pulldown or make a new group by just typing in a new word in that box.
Below the Voice command is the command details. A command detail has two thiings the Macro and the Help Text.
1. Macro
---------
Is made up of a series of individual commands, like RR::stop or MM::Hot_key_CMD|......
The macro for the above example "MAP MENU" consists of 3 individual commands:
1st a Map Monkey command to open the main menu
2nd tells Road Runner to show the GPS skin
3rd tells Road Runner to stop playing Music
(See the green text list in the screenshot)
To Create a new command for a maco choose the application from the pulldown Appplication list. Once you choose a different Application a different list appears on the righthand side that helps you if you are unfamilir with all the possible commands for one App. In the above example, I've only added 6 command for Roadrunner: PLAY, STOP, APPOSK and so on if you click on one of these the command text will be placed in the COMMAND input box. If the command is not in the list on the right then you can just type it into the Command textbox, in the above example stop was typed in by me.
IMPORTANT once you have selected you command you need to press the top ADD button to add the individual command to the MACRO. PRESSING the REMOVE button will delete the currently select individual command from the MACRO.
I need to add all the RR & FrodoPlayer (FP) command. All the FreeDrive (FD) and MapMonkey (MM) commands are there.
2. Help Text
------------
The Help text is useful because this is displayed in the main window when the Regoniser engine is running and you click on a command in the Help, it's not vital but is useful if you forget what a certain MACRO does.
Once you have modified an existing Voice command or created a new one press the bottom Add button to save the changes. Pressing the Delete button will remove the currently selected Voice command from the vocabulary completely. Each time you press the Delete or Add buttons at the bottom it saves the changes to the INI file.
To close this window press the CLOSE button at the top right.
To test your new commands you'll need to press the SpeakEasy text button on the TOP LEFT of the screen. Careful the VR text exits the applcation completely. I've designed the SpeakEasy VR buttons so that it is easy to use when driving, but if people have a better idea I'll change it.
OK.....after all that explaination I admin this Edit screen is not to my liking it is a very busy screen and is untidy and looks ugly. If anyone can make recommendations as to improving it I'll try to update the next release. Saying that it is probably easy than editing the INI file! But if you are brave give it a try.
Next message will tell you about adding new applications apart from RR, MM, FD, Keys.
Currently RR, MM, FD and keystrokes are supported but you can add your own ones. Here's how:
To add new application you need to edit the settings.xml file. SpeakEasy is fairly generic about how it talks to apps. You configure new plugins by adding a set of new entries in the <plugin section of the settings.xml file.
Example:
Here six plugins are configured: SE, RR, MM, MMKey, OPEN and FD.Code:
<plugin>
<name>
<anyType xsi:type="xsd:string">SE</anyType>
<anyType xsi:type="xsd:string">RR</anyType>
<anyType xsi:type="xsd:string">MM</anyType>
<anyType xsi:type="xsd:string">MMKey</anyType>
<anyType xsi:type="xsd:string">OPEN</anyType>
<anyType xsi:type="xsd:string">FD</anyType>
</name>
<method>
<anyType xsi:type="xsd:string">SELF</anyType>
<anyType xsi:type="xsd:string">COM</anyType>
<anyType xsi:type="xsd:string">MM</anyType>
<anyType xsi:type="xsd:string">KEY</anyType>
<anyType xsi:type="xsd:string">OPEN</anyType>
<anyType xsi:type="xsd:string">COM</anyType>
</method>
<windowName>
<anyType xsi:type="xsd:string">SE</anyType>
<anyType xsi:type="xsd:string">RoadRunner</anyType>
<anyType xsi:type="xsd:string">Map Monkey - [GPS]</anyType>
<anyType xsi:type="xsd:string">Map Monkey - [GPS]</anyType>
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string">FDSDK</anyType>
</windowName>
<className>
<anyType xsi:type="xsd:string">SE</anyType>
<anyType xsi:type="xsd:string">ThunderRT6FormDC</anyType>
<anyType xsi:type="xsd:string">ThunderRT6MDIForm</anyType>
<anyType xsi:type="xsd:string">ThunderRT6MDIForm</anyType>
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string" />
</className>
<port>
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string" />
<anyType xsi:type="xsd:string" />
</port>
</plugin>
Each plugin needs an entry for: name, method, windowName, classname and port.
1.
<name> gives the application a prefix so we can refer to this alias when writing commands. like RR::STOP which says use the RR settigns from the above entries and send it the STOP command.
2.
<method> section says how that applcation will be sent any commands. In the above example the second entry for <method> , which refers to the RR prefix, says to use COM.
The possible values for method are:
COM This says use windows COM sendMessage to send any commands
KEY This says send in keystrokes or type into a window/dialog box
TCP Uses TCP/IP to send messages (make sure you also specif the <port> entry if you use TCP/IP to know the server port number the plugin listens on
OPEN Open allows you to OPEN any application, it does not talk directly to any application, so the windowName/className/port are empty for TCP
SELF Is used for sending commands to SpeakEasy internal commands only
3.
<windowName> specifies the text that you see at the top of the applcation status bar. This allows us to identify the correct application to send the command.
4.
<className> specifies the programming class name of the plugin that recieves the command, again this is to help identify the correct application to send the message. You can put in both windowName and className or leave one blank if you are using COM, the code will try to figure out the rest once it is running.
5.
<port> is just used for TCP commands to tell SpeakEasy to send the command to a server port number 4419 is MapMonkey plugins port for example.
If you have never heard of windowName or className then I suggest you download this winspector spy application it will allow you to drag a "red bulleye" onto the window which you want to configure with SpeakEasy plugins and it will tell you the windowName and className. PM ruairi if you want help with this tool.
Note that if you make changes to the plugin section make sure that each subsection is in the correct order and that they look something like the examples that are already there. If you get stuck or want me to check your settings PM me with what you want.
Once you've save the settings.xml restart SpeakEasy and the changes will allow you to add new commands. If you want to make life easy for yourself there is a "CommandSet/object.ini" file that is used in the Edit window to help users see what commands are available in a select plugin. For example: my sample object.ini files has 3 can commands for Mapmonkey, these will appear in the Edit window on the righthand side if I select MM as the plugin to send the message:
[MM]
Hotkey_CMD|FE_MENU_OPEN Show Main Menu
Hotkey_CMD|FE_VIEW_MENU_OPEN Show View Menu
Hotkey_CMD|FE_ADD_SPEED_CAMERA Show Speed Camera
The syntax for objects.ini is
[name]
command1 (tab) Help text1
command2 (tab) Help text2
...
The "[name]" is the same as the <name> section of the settigns.ini file, "command1" is the command to send to the plugin and "Help text" is what is displayed if you click in the main SpeakEasy window on a potential command in a list of commands.
The object.ini file is not manditory it is just useful so you have pre-created commands in the Vocabulary Edit window of SpeakEasy.
looks cool i will check this out soon!
Nice work! Looks really slick.
Just messing around I found:
If you open the app, and go into setup. Without clicking anything else if you click delete or Add it will crash because of Null referance or trying to make a length < 0;
That is where you will need your try catch blocks :)
Cheers XBrady, Beta 2 is going to take some time I'm going to make it stable and add phrase locking without prefixes in Beta2. Also better support of MM and FP.
it's possible use in spanish?
I think to change the language is 1 line of code (as long as you have the Spanish SAPI installed). Do you have the Spanish SAPI installed, I'd need someone to test it.
I'll add multi-lingual support in Beta 2, good idea Xuri.
Ruairi, Do You Know Where I Can Find???