Skip to content

Push-to-talk transcription daemon for Wayland (Sway, Hyprland, niri, COSMIC) using Moonshine

License

Notifications You must be signed in to change notification settings

hiasinho/hammertalk

Repository files navigation

Hammertalk

Hammertalk

CI

Push-to-talk transcription daemon for Wayland (Sway, Hyprland, niri, COSMIC) using Moonshine.

Quick Install

curl -fsSL https://raw.githubusercontent.com/hiasinho/hammertalk/master/install-remote.sh | sh

This installs Rust (if needed), builds from source, downloads the model, and sets up the systemd service.

Arch Linux (AUR)

yay -S hammertalk-bin    # pre-built binary
yay -S hammertalk-git    # build from source

After installing, download the model:

/usr/share/hammertalk/download-model.sh

Manual Install

git clone https://github.com/hiasinho/hammertalk
cd hammertalk
./download-model.sh   # Download model (~106MB)
./install.sh          # Build and install

Update

Re-run the quick install script to update to the latest version:

curl -fsSL https://raw.githubusercontent.com/hiasinho/hammertalk/master/install-remote.sh | sh

Usage

Systemd (recommended)

systemctl --user start hammertalk
systemctl --user enable hammertalk  # auto-start on login

Manual

~/.local/bin/hammertalk

Control

hammertalk-ctl start   # begin recording
hammertalk-ctl stop    # stop and transcribe
hammertalk-ctl status  # check if running

Keybindings

Sway (~/.config/sway/config):

bindsym --no-repeat $mod+t exec ~/.local/bin/hammertalk-ctl start
bindsym --release $mod+t exec ~/.local/bin/hammertalk-ctl stop

Hyprland (~/.config/hypr/hyprland.conf):

bind = $mainMod, t, exec, ~/.local/bin/hammertalk-ctl start
bindrt = $mainMod, t, exec, ~/.local/bin/hammertalk-ctl stop

niri (~/.config/niri/config.kdl):

binds {
    Mod+T { spawn "sh" "-c" "~/.local/bin/hammertalk-ctl start"; }
    Mod+T release { spawn "sh" "-c" "~/.local/bin/hammertalk-ctl stop"; }
}

COSMIC: Use Settings → Keyboard → Shortcuts to add custom bindings for ~/.local/bin/hammertalk-ctl start (key press) and ~/.local/bin/hammertalk-ctl stop (key release). This one's for you, Marek. 😉

Hold the key, speak, release. Text appears at cursor.

Requirements

  • ydotool (and ydotoold running)
  • PipeWire or PulseAudio

Logs

journalctl --user -u hammertalk -f

Build from source

cargo build --release

Testing

cargo test          # run tests
./check.sh          # run all checks (format, clippy, tests, audit)

About

Push-to-talk transcription daemon for Wayland (Sway, Hyprland, niri, COSMIC) using Moonshine

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •