I copied your code above into a command module, added the boilerplate
to load it, and played around with it. For me everything seems to
work, although I'm not sure what you would like to happen here. So, in
other words I cannot reproduce your slow recognitions or recognitions
not happening. But, I'm not sure what I should be looking for...
Could you please explain what you are trying to achieve here? Perhaps
several usage examples (say this, get that result) would help me
understand your purpose.
Note that it appears that you are mixing the decoding of recognition
results with formatting of dictated text. I'm not sure that is the
best way to do custom processing of "in-line" formatting specifiers
such as "caps". I'd recommend instead to leave the Dictation element's
decode() method as is, and instead supply a custom dictation formatter
(instead of the standard
dragonfly.engines.backend_natlink.NatlinkDictationContainer).
Best regards,
Charlie
PS: You state a difference in behavior between actual use (human
speaking) and "simulation". How do you do such simulation?