From: Tim D. <ti...@gr...> - 2001-03-24 22:39:35
|
On Sat, 24 Mar 2001, Bruce & Laurie Winter wrote: > Version 2.47 was just uploaded to: > - Tim Doyle added a VOICE option to format=A mht tables. For those of you who may want to use this new feature, here's what you need to do. Suppose you have the following item in your MHT file: X10I, D4, Front_Porch_Lights, Lights|Downstairs|Front_Porch If you want to create a voice command to control this item, simply add a line similar to the following to your MHT file: VOICE, Front_Porch_Lights, Front Porch Lights and if you want to similarly control groups, you can do it in the same manner: VOICE, Lights, Lights VOICE, Front_Porch, Front Porch The first column is simply the VOICE command indicating that this entry will create a voice command. The second column must match the name of a device or group defined elsewhere in the file. This is the device that this voice command will be linked with. These must match exactly, or an error will be generated at startup. The third and final column holds the phrase to be used to control the device. It does not need to match the device name. The following code will be automatically created for the Front_Porch_Lights voice command entry as listed above: my $v_Front_Porch_Lights_state; $v_Front_Porch_Lights = new Voice_Cmd("Front Porch Lights [ON,OFF]"); if ($v_Front_Porch_Lights_state = said $v_Front_Porch_Lights) { set $Front_Porch_Lights $v_Front_Porch_Lights_state; speak "Turning Front Porch Lights $v_Front_Porch_Lights_state"; } Note that "[ON,OFF]" was added to the end of the phrase. This will only be added if there is no "[" character found in the phrase. You could do this instead: VOICE, Front_Porch_Lights, Front Porch Lights [ON,OFF,OTHER COMMAND] Please let me know if you have any problems, questions, or suggestions for this feature. Tim Doyle |