config.example.toml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [audio]
  2. backend = "parec" # "parec" (PulseAudio by name) | "sounddevice"
  3. device = "VirtualMicSink.monitor" # PulseAudio source name (parec) or device index/name (sounddevice)
  4. sample_rate = 16000
  5. channels = 1
  6. frame_ms = 30 # webrtcvad requires 10/20/30 ms
  7. gain = 1.0
  8. [vad]
  9. aggressiveness = 2 # webrtcvad 0-3
  10. pre_roll_ms = 400 # ring buffer kept BEFORE speech is confirmed
  11. speech_start_ms = 90 # consecutive speech frames needed to confirm start
  12. silence_ms = 700 # trailing silence that ends a turn
  13. min_utterance_ms = 300 # discard utterances with less actual speech than this
  14. max_utterance_s = 30.0 # hard cap: force-finalize a very long utterance
  15. chunk_pause_ms = 350 # once soft_max_s is reached, end a chunk at a pause this long
  16. soft_max_s = 10.0 # after this much speech, chunk-ends become eligible at pauses
  17. rms_floor = 0.008 # drop segments quieter than this RMS (kills noise-triggered blips)
  18. trailing_trim_ms = 200 # keep only this much trailing silence (less hallucination-prone padding)
  19. [whisper]
  20. model = "small" # multilingual (DO NOT use .en suffix)
  21. device = "cpu" # "cpu" | "cuda"
  22. compute_type = "int8" # "int8" cpu, "float16" cuda
  23. language = "auto" # "auto" | "en" | "es"
  24. beam_size = 1
  25. vad_filter = false
  26. no_speech_prob_max = 0.6 # drop segments Whisper thinks are non-speech above this
  27. avg_logprob_min = -1.0 # drop segments with confidence below this
  28. [output]
  29. stdout = true
  30. jsonl_dir = "transcripts" # one JSONL file per day: YYYY-MM-DD.jsonl
  31. save_audio = false # write each transcribed utterance as a 16 kHz mono WAV
  32. audio_dir = "audio" # WAV destination (YYYY-MM-DD subfolders); used only if save_audio
  33. [sink]
  34. sink_name = "VirtualMicSink" # Name of the null sink to create
  35. remap_source_name = "VirtualMic" # Name of the exposed microphone
  36. loopback_latency_msec = 1 # Loopback latency in ms
  37. monitor_output = false # Loop sink.monitor to default sink (AVOID: causes acoustic feedback)
  38. [daemon]
  39. queue_size = 50 # max utterances waiting for transcription (oldest dropped when full)
  40. backlog_warn_at = 5 # warn when the queue backs up this far (worker falling behind)
  41. [events]
  42. socket = "" # publish-only event socket (default $XDG_RUNTIME_DIR/stt-daemon.sock)
  43. heartbeat_ms = 1000 # heartbeat interval (progress-driven, from the capture loop)
  44. ring_size = 200 # recent events replayed to a newly attached subscriber
  45. [assistant]
  46. control_socket = "" # control socket (default $XDG_RUNTIME_DIR/stt-assistant.sock)
  47. stall_timeout_ms = 3000 # no heartbeat for this long -> STT considered offline
  48. worker_stall_ms = 15000 # heartbeats arriving but a transcription runs this long -> degraded
  49. command_arm_timeout_s = 10 # disarm a command if no turn is captured in this time
  50. chat_idle_timeout_s = 300 # leave chat mode after this much silence
  51. turn_gap_s = 1.5 # quiet gap that ends a turn
  52. require_viewer = true # refuse to execute commands with no TUI attached
  53. chat_exit_phrases = ["end conversation", "that's all", "stop listening"]
  54. [audit]
  55. enabled = true # write executed actions to a daily JSONL file
  56. dir = "audit" # audit/YYYY-MM-DD.jsonl
  57. [llm]
  58. enabled = true
  59. endpoint = "http://localhost:9931/v1/chat/completions" # llama.cpp, OpenAI-compatible
  60. temperature = 0.7
  61. max_tokens = 1024 # reasoning models spend tokens before the answer; keep this generous
  62. timeout_s = 120
  63. cache_prompt = true # reuse the KV prefix (append-only history keeps it warm)
  64. max_prompt_tokens = 64000 # ~half of the 131072 context
  65. trim_block_turns = 4 # drop history in blocks (not per-turn) to limit re-prefill
  66. max_tool_iterations = 3
  67. system_prompt_chat = "You are a concise voice assistant. Reply in 1-3 sentences."
  68. system_prompt_command = "You translate a spoken request into a single tool call when one applies."