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

Push to talk: How to Configure? #118

Open
quicksketch opened this issue Feb 21, 2024 · 2 comments
Open

Push to talk: How to Configure? #118

quicksketch opened this issue Feb 21, 2024 · 2 comments

Comments

@quicksketch
Copy link

Hi @ideasman42, fantastic project and I got it up and running in less than an hour, including some basic scripting.

Both in the README and in some other issues (#39 (comment)) you've describe setting up nerd-dictate with "push to talk". Could you describe how to set that up?

Using a Ubuntu Keyboard Shortcut (Settings -> Keyboard -> View and Customize Shortcuts -> Custom Shortcuts), I made a shortcut for "Start Dictation" that executes nerd-dictation begin &. Great. Now I can start dictation using the shortcut.

What I'd like to do however is to either:

A) Hit the key once to start, and hit it again to stop (I was thinking of hijacking caps-lock for this purpose). Or:
B) Hold and press the key to start, and stop when I lift up.

I figured I could probably write a script that checks the running processes with ps -A | grep parec and then toggle the command to be nerd-dictate start & or nerd-dictate end, and that would allow me to do option A. But I am stuck on how I could do option B. Could you suggest a way to accomplish this?

@beng-tang
Copy link

What I do is set keyboard shortcut Ctrl-B to run a shell script to start nerd dictation, and Ctrl-E to end it. You could also bind them to Scroll Lock and Ctrl-Scroll Lock.

@beng-tang
Copy link

beng-tang commented Sep 17, 2024

My scripts: ndb.sh:

#!/usr/bin/bash
cd /home/beng/apps/nerd-dictation/
./nerd-dictation begin --vosk-model-dir=./model --numbers-as-digits

nde.sh:

#!/usr/bin/bash
cd /home/beng/apps/nerd-dictation/
./nerd-dictation end

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

No branches or pull requests

2 participants