-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow defining a command prefix #18
Comments
Hey there, I think this idea would really help the script to gain popularity. Do you think including a prefix option would be difficult to implement based on the current state of the code? |
This would be a great feature to have. I'm currently using Aanyang to test an AI script and have circumvented not having this feature by using a command like 'OK computer (please) *term'. Unfortunately, it's missing that nice audio cue that it's actually listening like Google uses when you say "OK Google" with Google Now. Having this feature would allow a more robust use of Aanyang for situations like this. Great work overall by the way on this!!! |
+1 |
1 similar comment
+1 |
Any news on the implementation of this? This is exactly what I require since I am running Annyang continuously on a machine I keep on, currently its picking up everything but with this prefix it would stop random speech recognition playing through my speakers every time I get too close to the microphone. |
It's possible to do this without needing a PR or any modification to the library using a key rename function. Simply add your commands in object format - e.g.;
Then, add the following
Usage is as follows; I'd recommend adding a space on the end of your prefix (in this case, "Hello Annyang ". After that, simply call;
If you |
If no one is taken this up can I take it up? I am a beginner and would like to do it. |
I did it a while back but author was not responding |
@ChronSyn this worked for me but only when I removed the question mark from after the "I?" but thanks as it's a nice workaround for the hotword detection. |
A work around I have implemented on my application for this is define a command to turn on a state (lets say the command was "Ok Tom" and the state is named "isListening") for 5 seconds. Then have other commands to check if "isListening" active, before actually executing the logic assigned to the given command. |
@ChronSyn thank you so much it worked for me :) |
For example:
Now only sentences beggining with "OK, glass" will be parsed.
The text was updated successfully, but these errors were encountered: