-
Notifications
You must be signed in to change notification settings - Fork 120
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
add a kaldi rule (at least for sleep/wake) #797
Comments
This potential isn't too hard to implement. This would be relevant to all engines not just Kaldi. How Kaldi manages to make this work Note setting a grammar to exclusive overrides DNS's built-in sleep-wake function. When using DNS "natlink.setMicState("sleeping")" setting to match the state of the grammar. |
Overriding the DNS default commands for sleep/wake would be nice because you can use shorter commands such as "snore" to put the mic to sleep. Only downside is I'm not sure if we could get the taskbar icon toggling from green to blue. I think the Kaldi implementation is more important regardless. |
Fortunately I believe this can be handled by I agree the though the implementation is more important for WSR/Kaldi. |
Regarding Kaldi, would implementation involve changing content_loader.py or does this rule operate independent of how you load the other rules? |
Fortunately we don't have to change anything in Caster to make grammars exclusive. It's a simple bool. It works on any other rule. The rule must be already loaded into the engine before it's set to be exclusive. One set no other commands except for those that are exclusive through one or multiple rules will be recognized. |
@lexxish did you ever figure out getting sleep to work? |
With straight dragonfly this would be pretty easy with Caster it's a bit different because we don't know the grammar name being used as it's different every boot. I've been working on programmatically switching DNS Modes in preparation for creating a mode unified mode manager for all engines. The following could be used in the sleep grammar.
in another function then you can use You can also check for the running engine type if there is differences that need to be handled based on engine implementation. For example with DNS:
|
What's wrong with the current behavior @kendonB?
Besides creating a GUI the backend information could be obtained from a tweaked function to use
|
I have not tried yet. Will update you all if I do. I do have some "switch to" like code I can post if anyone wants it. I use a phonetic distance library to choose the best match based on what is currently running. Also have "open" like command that searches a couple directories (e.g. desktop)...it's not perfect and I think the way "bring" allows you to specify programs is also nice for things you use a lot. Another item that would be nice would be ability to use Kaldi for commands, but DNS for dictation - similar to how I believe Kaldi can be used with Google Speech Recognition. Last item that would be nice to have (but deserves it's own issue number) is integration with accessibility APIs like DNS has. So you can say things like "Click X" when X is a button in a browser. |
I could be wrong, but I think Caster's default maximize uses "alt+SPACE, x" to maximize rather then sending the foreground window a maximize message (https://docs.microsoft.com/en-us/windows/win32/learnwin32/window-messages). I don't think "alt+SPACE, x" works for every application, but can't think of a specific one right now. The same type of scenario for exists for closing windows in Caster too I believe, where we could send SIGTERM and/or SIGKILL message equivalents (probably two different voice commands) instead of using keyboard shortcuts and it would (hopefully) work more consistently. |
Back when implementing kaldi support I switched it from
Caster/castervoice/lib/utilities.py Line 77 in 7d3834e
|
I will open up a new issue. Done #814 |
I don't have experience with Natlink, and don't currently have Dragon installed, but I'd be happy to help implementing this. Is there a way with Natlink to just get straight dictation recognition text from audio data passed to it? daanzu/kaldi-active-grammar#23 |
Agreed |
The #881 addresses the following request.
|
Is your feature request related to a problem? Please describe.
Dragon has a bunch of built in commands that help with use. It would be nice for switchers to have a Kaldi rule loosely based on the functionality available in base Dragon.
Describe the solution you'd like
A Kaldi grammar with the following features:
hit
innav.py
.To add sleep/wake we need to translate the grammar in this file into caster.
@daanzu if you have any pointers or know of someone who has done this please let us know.
The text was updated successfully, but these errors were encountered: