1
votes

I'm trying to find out if the python library Dragonfly can use the context and grammar you give it to improve recognition. The idea being that if the speech recognition engine itself knows the grammar of what you can say, then recognition should be greatly improved, but if the Dragonfly library is just checking if arbitrary dictation taken from the recognizer matches the grammar, I'd expect no improvement.

Also, since Dragonfly supports both Dragon and Windows Speech Recognition, it'd be helpful to know if the answer differs depending on the engine.

3
Nope, because this question is helping me decide whether to purchase Dragon ;)Joseph Garvin
You could browse the Dragonfly source code to see how it talks to Dragon.Eric Brown

3 Answers

1
votes

The practical answer is yes. Technically Dragonfly just passes the grammar to the speech recognition engine (either Dragon or WSR), but the engines do in fact use the grammar to improve recognition. I've been using this for awhile now and as long as you don't make your grammars huge it works fairly well. The other answers saying no are just observing that Dragonfly itself doesn't do any of the work, but that's of no practical consequence because the engines do it instead. Grammar recognition is much better than arbitrary dictation. I have over 800+ commands recognized reliably and using SeriesMappingRule from the aenea project I can even say multiple of them in sequence in a single utterance.

0
votes

I can't say for sure about Dragon, but I'm certain that Dragonfly uses CFGs to define command grammars for Windows Speech Recognition. (I'd be very surprised if Dragonfly doesn't use CFGs for Dragon, as well; the reco benefits are substantial.)

0
votes

It seems that no, Dragonfly does not use the given grammar to improve recognition. It simply pass the first option of the SR engine to the rules of the grammar. At line 264 of the engine.py you cand find:

words = tuple(unicode(w, "windows-1252") for w in results.getWords(0))

according to the NatLink talk introduction and explanation the method

result.getWords(n)

returns the Nth option of the engine, so it (sadly) seems that DragonFly just keep the first one.

I have the same question so I took the liberty to ask to the developers to add a FAQ in the documentation starting with this question