Files

95 lines
2.1 KiB
Markdown

# voice_linux (C99)
Local hotkey dictation for Linux/X11 using:
- PulseAudio capture
- whisper.cpp transcription
- X11/XTest text injection
## Build deps (Debian/Qubes AppVM)
```bash
sudo apt update
sudo apt install -y build-essential cmake git wget libpulse-dev libx11-dev libxtst-dev libgtk-3-dev pkg-config
```
## Build app
Use [`build.sh`](build.sh):
```bash
# CPU whisper build
bash ./build.sh
# CUDA whisper build
WHISPER_CUDA=1 bash ./build.sh
# build without whisper integration
WITH_WHISPER=0 bash ./build.sh
```
`./voice_linux` is the single app binary and always launches the GTK window.
## Download whisper models
Download all supported test models:
```bash
bash ./scripts/download_models.sh
```
This fetches:
- `ggml-tiny.en.bin`
- `ggml-base.en.bin`
- `ggml-small.en.bin`
- `ggml-medium.en.bin`
- `ggml-large-v3-turbo.bin`
- `ggml-large-v3.bin`
## Run
```bash
./voice_linux
```
On startup, the app opens a dialog where you choose:
- CPU or GPU mode
- Whisper model from `./models/`
Default hotkey: `Ctrl+Alt+V`
- Press once to **start** recording
- Press again to **stop** recording, transcribe, and type into the focused window
If you see `[stt] [BLANK_AUDIO]`, recording worked but audio energy was near silent.
Check your input source with:
```bash
pactl list short sources
```
Then set `audio_device=` in [`config.ini`](config.ini).
## Versioning workflow
This project uses semantic git tags (`vMAJOR.MINOR.PATCH`) plus header macros in [`src/version.h`](src/version.h).
Use [`increment_and_push.sh`](increment_and_push.sh) to increment version, update [`VOICE_LINUX_VERSION`](src/version.h:4), commit, tag, and push:
```bash
# patch bump (default)
./increment_and_push.sh "Fix VAD trigger behavior"
# minor bump
./increment_and_push.sh -m "Add new GUI debug indicators"
# major bump
./increment_and_push.sh -M "Breaking config change"
# release mode (also runs bash ./build.sh and creates tarball)
./increment_and_push.sh -r -m "Release minor update"
```
## Notes
- This implementation targets **X11** (not native Wayland).
- In template-based AppVMs, system packages may not persist unless installed in the template.