Skip to content

donapart/klatsch

Repository files navigation

Klatsch 🐾

Always-on local agent for the OpenClaw ecosystem.

Klatsch runs on each of your machines (Windows or Linux/Pi) and gives OpenClaw eyes and ears on that host:

  • πŸŽ™οΈ Voice assistant β€” wake-word detection, Whisper STT, edge-TTS, German/English
  • πŸ”” Notification hub β€” receive push messages from the gateway and speak them aloud
  • πŸ“‘ Peer coordinator β€” Follow-Me routing: whoever is closest to the mic answers
  • πŸ–₯️ System awareness β€” processes, CPU/RAM, disk health, screenshot, clipboard
  • πŸ’Ύ Inventory proxy β€” exposes local disks and Git repos via HTTP
  • ⏰ Reminders β€” schedule spoken reminders by voice
  • πŸ“’ Intercom + broadcast β€” speak to one peer or all peers at once
  • πŸŒ… Morning briefing β€” daily 06–09 h gateway briefing (date, weather, agenda)
  • πŸ€– Ollama integration β€” "frag Ollama …" routes to a local LLM

The name is German for both "clap" and "gossip" β€” because when it works, you clap, and it always knows what's going on. πŸ‘


Requirements

  • Python 3.11+
  • FFmpeg (for edge-tts audio decode): winget install ffmpeg
  • An OpenClaw gateway running somewhere on the network

Installation

# Clone
git clone https://github.com/donapart/klatsch.git
cd klatsch

# Create venv + install deps
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Or run the one-shot setup script (Windows, auto-creates a startup shortcut):

powershell -ExecutionPolicy Bypass -File setup.ps1

Configuration

All settings are via environment variables (or a .env file):

Variable Default Description
GATEWAY_URL http://localhost:18789 OpenClaw gateway base URL
GATEWAY_TOKEN opensesame Gateway auth token
AGENT_ID main Agent ID to route voice commands to
HOST_NAME machine hostname Displayed in tray and logs
WAKE_WORDS hey klatsch,klatsch Comma-separated wake words
TTS_VOICE de-DE-ConradNeural edge-tts voice name
WHISPER_MODEL base faster-whisper model size (tiny/base/small)
MIC_THRESHOLD 0.015 Voice activity threshold 0.0–1.0
INPUT_DEVICE system default Audio input device index
OUTPUT_DEVICE system default Audio output device index
VOLUME 100 TTS playback volume 0–100
PEERS (empty) Space-separated peer URLs, e.g. http://other-host:7790
SPEAKER_SCORE 0.5 Follow-Me speaker proximity score 0.0–1.0

Running

# Normal mode (console)
python klatsch.py

# Background with system tray icon
python klatsch.py --tray

# Discover audio devices
python klatsch.py --list-devices

# Test microphone (5 s recording)
python klatsch.py --test-mic

# Specific devices
python klatsch.py --input-device 3 --output-device 5

HTTP API (peer server, default port 7790)

Each Klatsch instance runs a small HTTP server so peers and external services can interact with it.

GET endpoints

Endpoint Description
GET /health Status, hostname, presence
GET /inventory Local disks + Git project list
GET /screenshot Screenshot as base64 PNG
GET /clipboard Read clipboard text
GET /processes Top-20 processes by CPU
GET /syshealth CPU%, RAM%, disk usage
GET /find-file?q=query Search files by name

POST endpoints

POST /speak        {"text": "Hello!"}
POST /notify       {"text": "...", "from": "Bot"}
POST /intercom     {"text": "...", "from": "HOST-A"}
POST /clipboard    {"text": "text to set"}
POST /open-app     {"app": "chrome"}
POST /remind       {"text": "Stand-up!", "minutes": 15}
POST /broadcast    {"text": "...", "endpoint": "/notify"}
POST /wake-claim   (internal Follow-Me protocol)

Voice commands (German)

Say Action
"Hey Klatsch, …" Wake + command
"pause" Pause current TTS
"weiter" Resume TTS
"Klatsch, sag host-b: …" Intercom to peer
"sag allen dass …" Broadcast to all peers
"ΓΆffne Chrome" Open application
"fokussiere Discord" Bring window to foreground
"Zwischenablage" Read clipboard aloud
"erinnere mich in 10 Minuten an …" Set reminder
"Systemstatus" Speak CPU + RAM
"frag Ollama …" Query local LLM

Windows Explorer Integration

Right-click any file or use "Send To" to interact with Klatsch directly from Explorer.

Install

powershell -ExecutionPolicy Bypass -File install-context-menu.ps1

This adds three right-click entries and a "Send To" shortcut:

Menu entry Action
Mit Klatsch vorlesen πŸ”Š Read the file aloud via TTS
An Klatsch senden 🐾 Ask the AI agent about the file
Mit Klatsch zusammenfassen πŸ“ Get an AI summary
Send To β†’ Klatsch Same as "An Klatsch senden"

Uninstall

powershell -File install-context-menu.ps1 -Uninstall

Command-line usage

python klatsch-send.py speak report.txt       # read aloud
python klatsch-send.py ask config.yaml         # ask agent
python klatsch-send.py summarize meeting.md    # summarize
python klatsch-send.py notes.txt               # default: ask

Multi-device Follow-Me

Set PEERS=http://other-host:7790 on every host. When the wake word fires on multiple devices simultaneously, the one closest to the speaker (highest mic amplitude) wins β€” the others stay silent.


Optional dependencies

Package Feature
openwakeword Lightweight wake-word detection (falls back to Whisper)
pystray + Pillow System tray icon (--tray mode)
psutil GET /processes, GET /syshealth, presence watcher, disk watcher
pyperclip Clipboard read/write

License

MIT β€” see LICENSE.

Built on top of OpenClaw.

About

Klatsch 🐾 β€” OpenClaw Local Agent: always-on voice assistant, peer coordinator and system-awareness hub for Windows/Linux hosts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors