Replies: 3 comments
-
It's possible that there is a bug, but you might also have a problem in your grammar. Do the existing grammar examples work for you? |
Beta Was this translation helpful? Give feedback.
-
Yes, the existing grammars seem to work fine. My grammar appears to be written in the same style, yet I get inexplicable results. Here is a sample from this morning's tests:
Attached is the grammar I'm testing with. Note that it expects this pull request to be in use, and for My command-line for the As you can see, it commonly drops the rest of the utterance after the opening word or two, and in one case, recognized "ra", which isn't in the grammar. Any help with this would be gratefully received. |
Beta Was this translation helpful? Give feedback.
-
Ugh...I believe I found the problem. My "real" grammar's top-level rule didn't start with a space. Apparently that makes all the difference in the world. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to get whisper.cpp to work with an existing grammar, i.e. to make whisper.cpp another choice for speech-engine in an existing command/control application.
After getting a lot of bad parses, I finally hacked command.exe to print the result without applying the grammar, and verified that something is going wrong inside the grammar feature. In other words, it hears what I'm saying just fine without the grammar, but when the grammar is applied, it quite often hears gibberish, e.g. text that isn't even in the grammar.
Using a grammar works fine in many cases; what bothers me is that I'm getting worse results when using a grammar. If anything, I would expect the grammar to fail by finding a valid parse, with low probability, for something that doesn't match the grammar. Instead, I'm getting results that don't match the grammar at all, and with the same vocal sample, a near-perfect match when not using the grammar at all.
Unless the grammar feature is deeply broken, I'm not sure how else to explain this. Has anyone had the same experience?
Beta Was this translation helpful? Give feedback.
All reactions