-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Macro-like support #45
Comments
We have recently discussed it here: |
Hm, but how do you distinguish those two examples yourself? Suppose a On Thu, Dec 10, 2015 at 8:06 AM, Nickolay V. Shmyrev <
Sincerely, Alexander |
Well, the grammar defines them as exactly the same thing. So if you say |
I don't know if the title is a good one but I will try to explain what my goals are. English is not my native language so please forgive any mistakes I make :)
The basic idea is to listen to the user input by using your LiveSpeechRecognizer. The user says commands and the program should then execute them accordingly. A small example for the game I am working on:
As you can see, the third and forth command are equivalent to each other but the command isn't the actually the same. The usage of
select
feels more natural than just the plaincard 2
command. Implementing this kind of behavior is not that hard. One just needs to create a simple grammar files and defineselect
as optional:Now sphinx4 will recognize now both commands,
card 2
andselect card 2
. No we come to the part were the feature request takes place :)It is kinda hard to compare those two return values and decide if they are the same commands (which basically means they both match the grammar described above). The program needs to calculate the differences and then decide if they match or not. But the fact that sphinx4 already loads up the grammar and parses the input means that it knows both sentences are equally treated.
My request is that you might implement some kind of callback function where people can register to sphinx4 via an simple interface so they get notified if the user input matches some specific grammar conditions. Here is a small (pseudo-like) example of what I mean:
And maybe some registration service:
I would really really like to get feedback of you guys! You did a great job on this project. Keep your work up :)
Thank you for reading all that stuff,
Sven
The text was updated successfully, but these errors were encountered: