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,'; doneFor now, it only works on Linux due to evdev requirement.
- Mac support
- Windows support
On Linux the user must be part of the input group to access keyboard devices:
sudo usermod -a -G input $USERLog out and log back in for the group change to take effect.
Get uv:
curl -LsSf https://astral.sh/uv/install.sh | shIf you have an NVIDIA card and cuda toolkit installed:
uv tool install --reinstall -Caccel=cuda -Crepair=false git+https://github.com/lxe/yapyapFor CPU only (not recommended):
uv tool install --reinstall git+https://github.com/lxe/yapyapPress a chord, (KEY_LEFTCTRL,KEY_LEFTALT by default), speak, release the keys, and it will flush the transcription to stdout:
yapyapYou can change the key combination:
CHORD=KEY_FN yapyapBy default it's using If you're on CPU and it's slow, try a different model:
MODEL=tiny.en-q8_0 yapyapYou can perform actions on the output:
yapyap | while read l; do echo "do whatever you want with $l"; donePractical example: copy and paste anywhere on hyprland:
yapyap | while read l; do wl-copy -- $l && hyprctl dispatch sendshortcut 'CTRL+SHIFT,V,'; doneMIT