A background daemon for Wayland that transcribes audio and types results.
Project description
Harp 🎵
Harp is a powerful background daemon for Linux (specifically Wayland) that turns your voice into text, typed directly into any active window. It uses OpenRouter's multimodal APIs to provide high-quality transcription and intelligent command processing.
✨ Features
- Global Hotkey (
Ctrl + Space): Instantly start and stop voice capture from anywhere. - Direct Keyboard Emulation: Transcribed text is typed automatically into your active application.
- Multimodal Modes:
- Transcription Mode: Standard "Voice-to-Text" for typing emails, notes, or code.
- Command Mode (
Ctrl + Shift + Space): Send voice instructions to the LLM (e.g., "Summarize the previous paragraph") and get the response typed back.
- Flexible Operation:
- Hold Mode: Record while you hold the hotkey.
- Toggle Mode (
--toggle): Click once to start, click again to stop.
- Robust Typing:
- Supports standard US-ASCII and Latin characters (tildes, ñ, etc.).
- Safe Filtering: By default, only types letters and numbers to avoid accidental shortcut triggers. Use
--fullto type everything.
- Experimental Interactive Mode: Real-time transcription feedback as you speak (opt-in).
- Modern CLI: Beautiful terminal interface with colors, spinners, and panels powered by
Rich.
🚀 Installation
Using uv (Recommended)
The fastest way to run Harp without manual environment setup:
uvx harpio
Using pipx
For a persistent global installation:
pipx install harpio
From Source
git clone https://github.com/apiad/harp.git
cd harp
uv sync
uv run harp start
🛠 Setup & Requirements
- Permissions: Harp requires access to
/dev/inputand/dev/uinput.
sudo usermod -aG input $USER
# You may also need to set udev rules for uinput or run:
sudo chmod 666 /dev/uinput
- API Key: Create a
.envfile in your home or project directory:
HARP_API_KEY=your_openrouter_api_key
- Dependencies: Ensure
libportaudio2is installed on your system.
sudo apt install libportaudio2
⌨️ Usage
Start the daemon:
# Basic usage
harp
# With toggle mode and full character typing
harp --toggle --full
# Enable experimental interactive mode
harp --interactive --interval 1.5
🤝 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
🤖 Gemini CLI
This repository is enhanced with custom Gemini CLI commands to automate common tasks and workflows. If you are using Gemini, you can run:
gemini /onboard
to get started, explore the project architecture, and understand the automated workflows (planning, debugging, releases, etc.).
Standard Process
- Report Bugs: Open an issue if you find something broken.
- Suggest Features: Have an idea for a new mode? Let us know!
- Submit Pull Requests:
- Fork the project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'feat: Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
📄 License
Distributed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harpio-0.2.2.tar.gz.
File metadata
- Download URL: harpio-0.2.2.tar.gz
- Upload date:
- Size: 76.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd78fa8edecfa9f323cd7342c180a37477f760b9f08fca0e4d53ad8db8e20474
|
|
| MD5 |
4ba354f5272df8be26ba798b9cc44ae4
|
|
| BLAKE2b-256 |
58068b1275cce89fa69f2267336c3ac6a145ccac99bd7087e83c52fe25a3ab33
|
File details
Details for the file harpio-0.2.2-py3-none-any.whl.
File metadata
- Download URL: harpio-0.2.2-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d992de85e809e21f4a10403f4468797a5a8bec4b1bb8324b58975e9718eb842
|
|
| MD5 |
08c0fdacbfca081f20d45a81c2af24c7
|
|
| BLAKE2b-256 |
80d5450f4cf2cad9a0b0ec9edc10d1bfb2bf29fd9d2d9cb571b2a61a1e31e1b3
|