+30
-2
@@ -91,12 +91,16 @@ Hyprvoice uses a unified provider system where API keys are configured once and
|
||||
|
||||
[providers.deepgram]
|
||||
api_key = "..." # Or set DEEPGRAM_API_KEY env var
|
||||
|
||||
[providers.llama-swap]
|
||||
api_key = "..." # Or set LLAMA_SWAP_API_KEY
|
||||
base_url = "http://llama-swap.example:8080" # Do not include /v1
|
||||
```
|
||||
|
||||
**API key resolution order:**
|
||||
|
||||
1. `[providers.X]` section in config
|
||||
2. Environment variable (`OPENAI_API_KEY`, `GROQ_API_KEY`, etc.)
|
||||
2. Environment variable (`OPENAI_API_KEY`, `GROQ_API_KEY`, `LLAMA_SWAP_API_KEY`, etc.)
|
||||
|
||||
## Transcription Providers
|
||||
|
||||
@@ -104,6 +108,29 @@ Hyprvoice supports multiple transcription backends. See [docs/providers.md](./pr
|
||||
|
||||
### Cloud Providers
|
||||
|
||||
### LlamaSwap (network-hosted OpenAI-compatible models)
|
||||
|
||||
LlamaSwap proxies OpenAI-compatible endpoints, including `/v1/audio/transcriptions` and `/v1/chat/completions`. Configure its host once, then set the model IDs exactly as they appear in LlamaSwap's `/v1/models` response:
|
||||
|
||||
```toml
|
||||
[providers.llama-swap]
|
||||
api_key = "your-llama-swap-api-key"
|
||||
base_url = "http://192.168.1.50:8080" # No trailing /v1
|
||||
|
||||
[transcription]
|
||||
provider = "llama-swap"
|
||||
model = "whisper-large-v3-turbo"
|
||||
language = ""
|
||||
streaming = false
|
||||
|
||||
[llm]
|
||||
enabled = true
|
||||
provider = "llama-swap"
|
||||
model = "your-chat-model-id"
|
||||
```
|
||||
|
||||
The transcription and chat model IDs are deliberately not restricted by Hyprvoice: LlamaSwap selects from the models configured on your server. Hyprvoice submits transcription after recording ends, so set `streaming = false`.
|
||||
|
||||
### OpenAI Whisper API
|
||||
|
||||
Cloud-based transcription using OpenAI's Whisper API:
|
||||
@@ -455,7 +482,7 @@ Configurable text injection with multiple backends:
|
||||
|
||||
```toml
|
||||
[injection]
|
||||
backends = ["ydotool", "wtype", "clipboard"] # Ordered fallback chain
|
||||
backends = ["clipboard-paste", "ydotool", "wtype", "clipboard"] # Ordered fallback chain
|
||||
ydotool_timeout = "5s"
|
||||
wtype_timeout = "5s"
|
||||
clipboard_timeout = "3s"
|
||||
@@ -464,6 +491,7 @@ clipboard_timeout = "3s"
|
||||
### Injection Backends
|
||||
|
||||
- **`ydotool`**: Uses ydotool (requires `ydotoold` daemon for ydotool v1.0.0+). Most compatible with Chromium/Electron apps.
|
||||
- **`clipboard-paste`**: Temporarily copies text to the regular clipboard, sends Ctrl+V through wtype, then restores the prior text clipboard. This works in browsers and Electron apps and is layout-independent; recommended for Dvorak/Colemak users. Requires `wl-clipboard` and `wtype`.
|
||||
- **`wtype`**: Uses wtype for Wayland. May have issues with some Chromium-based apps (known upstream bug).
|
||||
- **`clipboard`**: Copies text to clipboard only. Most reliable, but requires manual paste.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user