Yes those are called payloads.
Here is the Python which will add a 7th payload that is the alternates, and I've separated the alternates using \r\n (new line) but you could change the Python to just use a comma if you wanted to.
Sorry the structure of the OSD object is undocumented at this point. It was originally intended to be used directly by plugins written in C# and in that context it is somewhat documented for the developer. One of the elements of OSD event object is a list of strings, named alternateSpeech.
so I added the line: strAlts = '\r\n'.join(osdInfo.alternateSpeech)
and then included the variable strAlts in the list of payloads when calling vc.triggerEvent.
from System.Collections.Generic import *
def osdEvent(osdInfo):
strText = unicode(osdInfo.speechText)
strCommandName = unicode(osdInfo.commandName)
strGroup = str(osdInfo.groupName)
strConfidence= str(osdInfo.confidence)
strPass = str(osdInfo.confidencePassed)
strDoingCommand=str(osdInfo.doingCommand)
strAlts = unicode('\r\n'.join(osdInfo.alternateSpeech))
vc.OnOSD -= osdEvent
vc.OnOSD += osdEvent
I haven't looked at your commands yet, but ultimately if you are going to send this to Growl, it would be better to send it directly from the Python plugin in order to reduce the amount of work VC has to do every time it hears a voice command. This is actually the reason I don't create events for recognized speech, because I think it would just be too much overhead on top of whatever else VC is supposed to do with your voice command when it's recognized.
Oh yeah, now the solution is complete! Thank you very much nime5ter and jitterjames!
This solution to my feature request is much better and much more flexible and useful to me than what I asked for.
I guess this solution also could be satisfying to SteveB69 who started this thread.
I'm not surprised that there existed a solution because Voxcommando is a very cleverly designed application with lots of possibilities, flexibility and customizability and even though Voxcommando is a very powerful application it is at the same time not very difficult to learn and understand. Many applications are either powerful or easy to understand, Voxcommando is both.
After a computer reboot the timeout/duration parameter for the OSD.ShowText started to work correctly on my computer which gives me even more freedom to choose which Action I want to use for my automatic OSD setup.
I can choose to use OSD.ShowText Action if I want shorter timeout length than 3 seconds or I can choose to use Growl Action if I want it's extra features.
I love Voxcommando's high level of possibilities and customizability.
If there's a downside with a solution or when using a feature for me it's better to be given the information about the downside and then myself decide if the downside is worth paying to get the feature rather than all possible solutions is not presented/given to me.
In this case, about creating events for recognized speech perhaps adding to much overhead, for me I would have preferred a setting in Options to be able to turn on creating events for recognized speech if I needed it and then see how it affected my computer. If I would find it had to great negative impact on my computer I could just turn off these events again.
These kind of advanced settings could be put in a special section in options called Advanced.
About me confusing Payloads with variables I will try to get to understand the difference but it's really, really difficult and confusing for me to understand why Payloads aren't variables.
When the wiki about Payloads says;
"These placeholders are then replaced in the command's macro by the values we provide when we issue our voice commands (or through event payloads)."
it makes it even harder for me to understand that payloads are not variables. But I'm no programmer so perhaps I have misunderstood what variables are.
Regardless if I will manage to understand it or not I'll try to use the terms correctly in the future. Thanks for the links nime5ters.