I still don't think these commands are going to be very satisfying, but here is a fixed version of the command group:
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.3.6-->
<commandGroup open="True" name="what can I say" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="454" name="What Can I Say" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Builds a list of enabled commands topics (based on CommandsGroups). Make sure Group.rebuild refers to this group name, if you've chosen to change the group name.">
<action>
<cmdType>PayloadXML.Clear</cmdType>
<params>
<param>payloads\VC_Commands_Topics.xml</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Choose a Topic</param>
<param>15000</param>
<param>-5</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Choose a Topic</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>File.Read</cmdType>
<params>
<param>voicecommands.xml</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>\&amp\;</param>
<param>And</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param><commandGroup.*name="([^---].*)".*enabled="True"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.AddText</cmdType>
<params>
<param>{i}. {Match.{i}}</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param><silence msec="100"/>{i}. {Match.{i}}.</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>PayloadXML.AddPair</cmdType>
<params>
<param>payloads\VC_Commands_Topics.xml</param>
<param>{Match.{i}}</param>
<param>{Match.{i}}</param>
<param>True</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>Group.Rebuild</cmdType>
<params>
<param>what can I say</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType />
<params />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>What Can I Say?</phrase>
</command>
<command id="356" name="Commands in a Topic" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Help.ShowAll</cmdType>
<params>
<param>False</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetLastResult</cmdType>
<params>
<param>{1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.Replace</cmdType>
<params>
<param><![CDATA[ ]]></param>
<param>\s</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>\((.*?)\)</param>
<param>\($1\)</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>CommandGroup</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>File.Read</cmdType>
<params>
<param>commandhelp.html</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExSingle</cmdType>
<params>
<param>id="heading">{Var.CommandGroup}.*?</div>(.*?)id="clear"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>LastActionSuccess</ifType>
<ifParams>&&</ifParams>
<then>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Commands in {1}</param>
<param>10000</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetLastResult</cmdType>
<params>
<param>{Match.1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param><TD.*?>(.*?)</TD></param>
<param> $1</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>(\d+),(\d+)</param>
<param>$1 to $2 </param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param><BR\s/>\s*</param>
<param>/</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>{(.*?)}</param>
<param>$1 </param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param> \|</param>
<param>,</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param><tr>(.*?)</tr></param>
<param>$1</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param><div\sid="command"><table><tr></tr></table></div></param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param><table>([^---].*)</table></param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<params>
<param>Commands in {1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.addText</cmdType>
<params>
<param>{i}. {Match.{i}}</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>{i}. {Match.{i}}</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Sorry. I could not find voice commands for the '{1}'.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Sorry. I could not find voice commands for the '{1}'.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<phrase>List commands</phrase>
<phrase>of, in, about, for</phrase>
<payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\VC_Commands_Topics.xml</payloadFromXML>
</command>
<command id="55" name="Stop talking" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>TTS.Stop</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Stop talking, shut up, that's enough</phrase>
</command>
</commandGroup>
Some problems with the original:
1. When sharing commands like this on the forum it's best to use relative paths since other users will not share the same absolute file paths. The Scrape action, however, won't work with relative paths. Instead we can use the File.Read action, as this works with relative paths.
2. All default configurations come with a "Show help/What can I say?" command. This command uses the
Help.ShowAll action, which first generates an html page called "commandhelp.html" and then displays that web page in your web browser.
If you have never used that command then the commandhelp.html file won't exist. If it doesn't exist, then the "List commands in group X" command will have nothing to read and the command will fail. This may have been the problem you were having. As well, if your configuration has changed since the last time that default show help command was executed, then the html page won't include those command changes.
In the revised command group above, I added a Help.ShowAll action at the beginning of the "What can I say" command to make sure that the html page is generated and is current.
3. I strip out optional phrases and made some other minor changes to how voice command strings are formed because I found it made the list of commands much more readable and easier to understand. I also strip out any ( ) symbols that are in group names, as these will obviously interfere with the subsequent regular expression matching and break the command if we ask for information about a group that has parentheses in the name. There may be other characters that will interfere as well. If the commands are still malfunctioning for you, this is something to look out for.
4. I added a "shut up" command which stops the TTS if it's carrying on too long and you don't want to wait for the command to finish reading out a long list of voice commands.
5. I have shared the commands in a command group called "what can I say". This group needs to be rebuilt in order to be able to load the payload xml with the command group names that is used in the the second command. If you change the name of the group, that Group.Rebuild action will need to be updated.
6. The default command that comes with all configurations already uses the phrase "What can I say?". Users who want to use the command group posted here should delete that phrasing from the default Show Help command. Obviously it's a bad idea to have 2 commands triggered by the same voice command.