Skip to content
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

[WIP] Add word cmd map #17

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[WIP] Add word cmd map #17

wants to merge 3 commits into from

Conversation

omlins
Copy link

@omlins omlins commented Aug 19, 2021

Enable mapping of single words to commands, here mouse-clicks.

WIP: This requires an option for single-pass word-by-word processing (or similar) in order to enable continuous listening to commands without emitting them multiple times, c.f. #16 (at present, the PR will lead to a firework of mouse-clicks...).

Also, to avoid undesired behavior in continuous listening the option to Add '--commands' command line argument to restrict input to a limited set of commands (#3) could also be a solution here.

@omlins omlins changed the title [WIP] Add single-word cmd map [WIP] Add word cmd map Aug 24, 2021
@ideasman42
Copy link
Owner

Nice to see this moved into examples, although this is significant enough that I think it should be a separate example, since it contains quite a lot of command specific logic.

Also, there should be a way to force nerd-dictation to reset so that existing commands are not re-written based on further speech analysis.

Although this can be handled separately.

@omlins
Copy link
Author

omlins commented Aug 25, 2021

Also, there should be a way to force nerd-dictation to reset so that existing commands are not re-written based on further speech analysis.

Yes, I also see it exactly that way. Please have a look at issue #19 where I am proposing:

For this workflow, nerd-dictation should provide a reset function that can be called from within the configuration script (nerd-dictation.py). Moreover, it could be very useful if this reset function accepted a command name which could then be passed further to nerd_dictation_process as an optional argument.

@ideasman42 ideasman42 force-pushed the master branch 8 times, most recently from 38f30a0 to 3018c66 Compare October 5, 2021 02:26
@asamwow
Copy link

asamwow commented Nov 17, 2021

@omlins got any new updates? I'm looking into this feature as well.

@asamwow
Copy link

asamwow commented Nov 17, 2021

this is too much to be in a config file. only the command map should be in the config file.

@asamwow
Copy link

asamwow commented Nov 17, 2021

so I think we need two user config functions. First one that is called looking for cmd keywords. then it will "fall through" to nerd_dictation_process if no commands are recognized.

@asamwow
Copy link

asamwow commented Nov 17, 2021

#27

@ideasman42 ideasman42 force-pushed the master branch 8 times, most recently from 569fdae to 4a922ad Compare January 9, 2022 09:28
@ideasman42 ideasman42 force-pushed the master branch 2 times, most recently from ac42ce8 to 1df83e0 Compare May 16, 2022 07:51
@ideasman42 ideasman42 force-pushed the master branch 6 times, most recently from f72c0d1 to 5f3b3e9 Compare May 16, 2022 23:45
@ideasman42 ideasman42 force-pushed the master branch 3 times, most recently from 2436242 to 72eef57 Compare November 3, 2022 23:38
@KJ7LNW
Copy link
Contributor

KJ7LNW commented Jan 31, 2023

It would be neat if you can teach Vosk a grammar with only the words and the command structure. I'm not sure if the vosk python library supports this, but reducing the words that are matched would increase the accuracy of commands that are spoken.

@KJ7LNW
Copy link
Contributor

KJ7LNW commented Feb 9, 2023

@omlins, nerd-dictation now has Vosk Grammar support, see #84 and the example here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants