An open API service indexing awesome lists of open source software.

https://github.com/shatilkhan/knightingale

Wisprflow alternative for windows and linux with self hosted models and api support
https://github.com/shatilkhan/knightingale

cli dictation linux macos rust speech-to-text stt voice-input whisper windows

Last synced: 14 days ago
JSON representation

Wisprflow alternative for windows and linux with self hosted models and api support

Awesome Lists containing this project

README

          


Knightingale

Knightingale


Voice dictation that minds its own business.


stars
forks
watchers
release
downloads
ci
license
repo size
hits

---

A minimal voice dictation daemon for Linux, Windows, and macOS. A single static binary listens for a global hotkey, records your microphone, transcribes either through a cloud STT API you choose or a Whisper model running locally, and types the result into whatever window has focus.

## Install

```sh
curl -fsSL https://shatilkhan.github.io/knightingale/install.sh | sh
```

Then:

```sh
knightingale setup # pick Cloud (BYOK) or Local, set hotkey
knightingale toggle # start dictating
```

The default hotkey is **Super+K** on Linux/Windows and **Cmd+Shift+K** on macOS. Hit it to start, hit it again to stop and type.

Alternatives:

```sh
cargo install knightingale # if you have Rust installed
brew install ShatilKhan/tap/knightingale # macOS (later)
scoop install knightingale # Windows (later)
```

## Why

- **xhisper** (~5 MB, bash + C) is Linux-only and needs shell glue.
- **openwhispr** (~300 MB RAM, Electron) is feature-rich but heavy.
- **WisprFlow / SuperWhisper** are closed-source SaaS.

Knightingale picks the middle: ~15–30 MB binary, ~10–40 MB RAM idle, cross-platform, BYOK + local STT, no telemetry, MIT licensed.

## Cloud providers (bring your own key)

One config field selects which credential block to read. Eight named providers share the same `/v1/audio/transcriptions` HTTP shape; a `custom` provider plus a `local` whisper.cpp backend cover everything else.

| Provider | env prefix | default model |
|---|---|---|
| `groq` *(default)* | `GROQ_*` | `whisper-large-v3-turbo` |
| `openai` | `OPENAI_*` | `whisper-1` |
| `deepinfra` | `DEEPINFRA_*` | `openai/whisper-large-v3-turbo` |
| `fireworks` | `FIREWORKS_*` | `whisper-v3-turbo` |
| `lemonfox` | `LEMONFOX_*` | `whisper-1` |
| `sambanova` | `SAMBANOVA_*` | `Whisper-Large-v3` |
| `azure` | `AZURE_OPENAI_*` | per-deployment |
| `custom` | `CUSTOM_BASE_URL`, `CUSTOM_API_KEY`, `CUSTOM_MODEL` | self-hosted Speaches / LocalAI / vLLM |
| `local` | `KNIGHTINGALE_MODEL_PATH` | `distil-small.en` (Phase 2) |

API keys live in `~/.config/knightingale/.env` (mode 0600). The TOML config beside it is safe to share.

## Local models

Knightingale doesn't auto-pull Whisper checkpoints — that's an Ollama-class
feature and not worth the complexity for a one-time setup. Instead:

```sh
knightingale model recommend # spec-aware pick for your machine
knightingale model where # prints the curl command
```

Run the curl line once, then point `KNIGHTINGALE_MODEL_PATH` at the file:

```sh
echo 'KNIGHTINGALE_MODEL_PATH=~/.cache/knightingale/models/ggml-distil-small.en-q5_1.bin' \
>> ~/.config/knightingale/.env
```

`model list` shows the catalog. Sizes range from `tiny.en` (~32 MB) to `large-v3` (~1.1 GB Q5). The default `distil-small.en` is real-time on CPU and fits 4 GB VRAM laptops; `large-v3-turbo` is the sweet spot for RTX-class GPUs.

## Privacy

Knightingale does not collect or transmit telemetry of any kind. No usage metrics, no error reports, no analytics, no phone-home. Your audio, transcripts, and configuration stay on your machine unless you explicitly point Knightingale at a cloud provider — in which case audio is sent **only** to the API endpoint configured in your `.env`, with your key, and nowhere else. No proxy, no cache, no logging by us.

## Commands

| | |
|---|---|
| `knightingale toggle` | Start / stop a recording |
| `knightingale status` | Print daemon state |
| `knightingale doctor` | Diagnose problems |
| `knightingale setup` | Re-run the interactive install flow |
| `knightingale logs [--since 1h] [--path]` | Tail the daemon log |
| `knightingale config show` | Print config (secrets redacted) |
| `knightingale config edit` | Open `config.toml` in `$EDITOR` |
| `knightingale config edit-secrets` | Open `.env` in `$EDITOR` |
| `knightingale config set ` | Set a config field |
| `knightingale config set-key ` | Hidden prompt for an API key |
| `knightingale config test` | Verify the active provider |
| `knightingale config provider list` | Print providers + defaults |
| `knightingale config mic list` / `set ` | Pick the input device |
| `knightingale banner [--wide]` | Print the ASCII bird |

## Architecture

See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full design. In one paragraph: a Cargo workspace splits the code into `knightingale-core` (audio, STT, IPC, config, status), a thin `knightingale-daemon` that pulls those modules together inside a `std::thread` loop, and a `knightingale` CLI client that talks to the daemon over a local socket. No async runtime. No tokio. No Electron.

## Documentation

Documentation site: [shatilkhan.github.io/knightingale](https://shatilkhan.github.io/knightingale/) *(published from `docs/` after Phase 1 polish)*.

## Contributing

Issues and PRs welcome. Read [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) before proposing a refactor.

## License

[MIT](LICENSE).