config.toml.
Voice Activity Detection (VAD)
Klaus uses WebRTC VAD with multi-stage filtering to detect when you’re speaking and reject background noise.VAD Sensitivity
WebRTC VAD sensitivity level for noise filtering.Valid range:
0 to 30= Least aggressive (accepts more background noise)1= Low sensitivity2= Medium sensitivity3= Most aggressive noise filtering (default, recommended)
Seconds of silence before voice activation finalizes your question.Typical range:
1.0 to 3.0 seconds- Lower values finalize faster but may cut off slow speakers
- Higher values wait longer for you to continue speaking
VAD Quality Gates
These settings filter out low-quality audio before it reaches STT:Minimum utterance duration in seconds.Audio shorter than this is rejected as noise. Helps filter out brief background sounds.
Minimum ratio of voiced frames to total frames.Range:
0.0 to 1.0An utterance must have at least this fraction of frames classified as “voiced” by WebRTC VAD. Helps reject sustained background hum or fan noise.Minimum number of voiced 30ms frames in an utterance.Utterances with fewer voiced frames are rejected. Works with
vad_min_voiced_ratio to filter noise.Minimum RMS loudness in dBFS (decibels relative to full scale).Typical range:
-60.0 to -30.0-60.0= Very quiet (accepts almost everything)-45.0= Moderate loudness gate (default)-30.0= Loud (requires clear, loud speech)
Minimum length of the longest contiguous run of voiced frames.The utterance must contain at least one contiguous sequence of voiced frames of this length. Helps reject choppy noise that WebRTC VAD might accept.
VAD Configuration Example
config.toml
Query Router
Klaus uses an intelligent query router to classify questions and decide what context (image, history, memory, notes) to include.Enable intelligent query routing.
true: Router classifies each question and optimizes context (default, recommended)false: All questions get full context (slower, more expensive, may reduce quality)
Router Model
Claude model used for ambiguous intent classification.The router uses local heuristics for most questions. Only uncertain classifications invoke this model.Options: Any Anthropic Claude model, e.g.:
claude-haiku-4-5(default, fast and cheap)claude-sonnet-4-6(more accurate, slower, more expensive)
Router Timeouts
LLM router call timeout in milliseconds.If the router model doesn’t respond within this time, Klaus falls back to the default route.Typical range:
200 to 1000 msMaximum output tokens for LLM router classification.The router only needs a brief classification response. Keep this low to reduce latency and cost.
Router Confidence Thresholds
Minimum confidence for local heuristic routing to skip LLM call.Range:
0.0 to 1.0If local heuristics produce a confidence score above this threshold, the LLM router is not invoked.- Higher values → more LLM router calls (slower, more accurate)
- Lower values → more local routing (faster, cheaper)
Minimum margin between top two local route scores to skip LLM call.Range:
0.0 to 1.0If the difference between the top two route scores is below this threshold (i.e., too close to call), the LLM router is invoked.- Higher values → more LLM router calls (slower, more accurate)
- Lower values → more local routing (faster, cheaper)
Minimum confidence for LLM router classification.Range:
0.0 to 1.0If the LLM router’s confidence is below this threshold, Klaus falls back to a default route.Router Configuration Example
config.toml
Query routing reduces latency and API costs by only sending relevant context. Most turns are classified by fast local heuristics; uncertain turns get a lightweight LLM call.
User Background
Optional free-text description of your background and expertise.Klaus injects this into the system prompt so it can tailor explanations to your level.Example:
Obsidian Integration
Path to your Obsidian vault folder for the notes feature.When set, you can ask Klaus to save notes directly to your vault.Example:You can also use the environment variable
OBSIDIAN_VAULT_PATH.If
obsidian_vault_path is empty, the notes feature is disabled. Configure this in the Settings dialog under the “Profile” tab.Logging
Logging verbosity level.Options:
DEBUG: Very verbose, shows all internal operationsINFO: Normal verbosity, shows key operations (default)WARNING: Only warnings and errorsERROR: Only errors
Example: Enable Debug Logging
config.toml
Microphone Device
Index of the microphone device to use.Default:
-1 (system default microphone)If you have multiple microphones:-1= Use system default0= First microphone1= Second microphone, etc.
Setup Wizard
Flag indicating whether the first-run setup wizard has been completed.Do not edit this manually. It’s set automatically by the setup wizard.To re-run the setup wizard:
- Close Klaus
- Edit config.toml and set
setup_complete = false - Restart Klaus
Example: Complete Advanced Configuration
config.toml
Performance Tuning
For Noisy Environments
For Quiet/Soft Speakers
For Faster Response Times
For Cost Optimization
Troubleshooting
VAD Triggers on Background Noise
- Increase
vad_sensitivityto3 - Increase
vad_min_rms_dbfs(e.g., from-45.0to-40.0) - Increase
vad_min_voiced_ratio(e.g., from0.28to0.35)
VAD Misses Quiet Speech
- Decrease
vad_sensitivityto2or1 - Decrease
vad_min_rms_dbfs(e.g., from-45.0to-50.0) - Decrease
vad_min_voiced_ratio(e.g., from0.28to0.20)
Router Too Slow
- Decrease
router_timeout_ms(e.g., to250ms) - Increase
router_local_confidence_thresholdto avoid LLM calls - Increase
router_local_margin_thresholdto make local routing more decisive
Notes Feature Not Working
- Verify
obsidian_vault_pathis set correctly - Check that the path exists and Klaus has write permissions
- Ensure the path doesn’t have a trailing slash