Skip to content

lxe/yapyap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yapyap - Fast and simple push to talk dictation

yapyap.mp4

When you press and hold a specific key combination (left ctrl + alt by default), it records audio and automatically transcribes it to text using whisper.cpp, then flushes the transcription to stdout, so you can do whatever with it, like:

yapyap | while read l; do wl-copy -- $l && hyprctl dispatch sendshortcut 'CTRL+SHIFT,V,'; done

For now, it only works on Linux due to evdev requirement.

TODO:

  • Mac support
  • Windows support

Requirements

On Linux the user must be part of the input group to access keyboard devices:

sudo usermod -a -G input $USER

Log out and log back in for the group change to take effect.

Installation

Get uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

If you have an NVIDIA card and cuda toolkit installed:

uv tool install --reinstall -Caccel=cuda -Crepair=false git+https://github.com/lxe/yapyap

For CPU only (not recommended):

uv tool install --reinstall git+https://github.com/lxe/yapyap

Usage

Press a chord, (KEY_LEFTCTRL,KEY_LEFTALT by default), speak, release the keys, and it will flush the transcription to stdout:

yapyap

You can change the key combination:

CHORD=KEY_FN yapyap

By default it's using If you're on CPU and it's slow, try a different model:

MODEL=tiny.en-q8_0 yapyap

You can perform actions on the output:

yapyap | while read l; do echo "do whatever you want with $l"; done

Practical example: copy and paste anywhere on hyprland:

yapyap | while read l; do wl-copy -- $l && hyprctl dispatch sendshortcut 'CTRL+SHIFT,V,'; done

License

MIT

About

fast and simple push to talk dictation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages