Discord voice assistant and generators
- TypeScript 80.5%
- Python 8%
- JavaScript 6.8%
- Shell 2.3%
- CSS 1.3%
- Other 1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- generators/README.md: Overview of all standalone tools - generators/radio-lookup/README.md: Full radio-lookup documentation - Lists usage, features, and integration info for each tool |
||
| email-analyzer | ||
| generators | ||
| shared | ||
| voice-bot | ||
| voice-typer | ||
| .gitignore | ||
| email-analyzer-plan.md | ||
| MUSIC_PLAYER_FIX_REPORT.md | ||
| README.md | ||
| SUBAGENT_COMPLETION_SUMMARY.md | ||
| tsconfig.base.json | ||
kClawd
AI voice assistant, image generation, and utility tools — voice conversations via Discord, image creation via OpenRouter, currency/commodity conversion.
Modules
- voice-bot — Discord voice bot. Joins channels, listens to speech with wake word detection, responds via TTS. TypeScript, discord.js, faster-whisper, Piper TTS.
- generators/image-gen — Text-to-image and image-to-image generation via OpenRouter (Gemini 3 Pro). 1K/2K/4K resolution.
- generators/converter — Currency and cryptocurrency converter with commodity equivalents. Supports 190+ fiat currencies, 19 cryptos, metals, and fun items. German language support.
Architecture
┌──────────────┐ ┌──────────────────┐ ┌───────────────┐
│ Discord VC │────▶│ voice-bot │────▶│ OpenClaw │
│ (Opus) │◀────│ STT → LLM → TTS │◀────│ Gateway │
└──────────────┘ └──────────────────┘ └───────────────┘
┌──────────────┐ ┌──────────────────┐ ┌───────────────┐
│ User/Agent │────▶│ image-gen │────▶│ OpenRouter │
│ (CLI) │◀────│ prompt → image │◀────│ (Gemini 3) │
└──────────────┘ └──────────────────┘ └───────────────┘
┌──────────────┐ ┌──────────────────┐ ┌───────────────┐
│ User/Agent │────▶│ converter │────▶│ Public APIs │
│ (CLI/HTTP) │◀────│ currency + item │◀────│ (Free tier) │
└──────────────┘ └──────────────────┘ └───────────────┘
Voice Pipeline
- Capture — Audio from Discord (Opus 48kHz stereo)
- STT — faster-whisper (GPU, large-v3) transcribes speech
- Wake word — Detects "bot"/"god"/"pot" + variants, filters filler words
- LLM — OpenClaw Gateway generates a response
- TTS — Piper TTS (local, CPU-based, German/English)
- Playback — Audio streamed back to the voice channel
Requirements
- Linux (WSL2 supported)
- Node.js 22+ / Bun (for converter)
- Python 3.10+ with
faster-whisperandpiper-tts - NVIDIA GPU with CUDA 12.x (for voice bot Whisper acceleration)
- ffmpeg
- OpenClaw Gateway running on port 18789 (for voice bot)
- OpenRouter API key (for image generation)
Quick Start
Voice Bot (Discord)
cd voice-bot
cp .env.example .env # fill in Discord token + Gateway token
npm install
./start.sh
Commands: !join, !leave, !say <text>, !status, !help
See voice-bot/README.md for full setup.
Image Generation
cd generators/image-gen
# Set OPENROUTER_API_KEY in .env
./imggen "a cyberpunk city at night"
./imggen "make the sky sunset" -i photo.jpg -r 2k
See generators/image-gen/README.md for details.
Currency Converter
cd generators/converter
bun converter.ts "15.5 DOT" "HKD" --lang de
bun converter.ts "100 EUR" "USD" --commodity gold
bun converter.ts --serve --port 3456 # HTTP API mode
Supports crypto (BTC, ETH, DOT, etc.), fiat currencies, and commodity equivalents (metals, liquids, fun items).
See generators/converter/README.md for details.
Project Structure
kClawd/
├── voice-bot/ # Voice bot workspace
│ ├── voice-bot/ # Application source (TypeScript)
│ │ └── src/ # index.ts, voice-receiver.ts, etc.
│ ├── shared/ # Shared modules (STT, TTS, Gateway client, logger)
│ ├── start.sh # Entry point with prerequisite checks
│ └── .env # Configuration
├── generators/
│ ├── image-gen/ # Image generation tool (OpenRouter)
│ └── converter/ # Currency + commodity converter (Bun)
├── shared/ # Root-level shared modules (reference copy)
├── venv-piper/ # Python venv for Piper TTS
└── tsconfig.base.json # Shared TypeScript config
HTTP APIs
Voice Bot
POST http://localhost:18790/speak— Speak text through active voice channelGET http://localhost:18790/health— Health check + active sessionsGET http://localhost:18790/status— Uptime and session count
Converter
GET http://localhost:3456/convert?amount=20&from=PLN&to=USD— Convert currencyGET http://localhost:3456/commodities— List all commoditiesGET http://localhost:3456/currencies?base=USD— List available currenciesGET http://localhost:3456/health— Health check
Features
Voice Bot
- Wake word detection with fuzzy matching
- GPU-accelerated speech transcription (faster-whisper)
- Multilingual TTS (Piper: German + English)
- Automatic silence detection and utterance boundaries
- Conversation logging to
transcriptions.jsonl - HTTP API for external control
Image Generation
- Text-to-image and image-to-image editing
- Multi-resolution support (1K, 2K, 4K)
- Auto-naming from prompts
- Cost tracking (USD per request)
- JSON output with file paths
Converter
- 190+ fiat currencies + 19 cryptocurrencies
- Live precious/industrial metal pricing
- Dynamic liquid+container commodities (glass of beer, bathtub of oil, etc.)
- Silly abstract items (hamburgers, therapy sessions, parking tickets)
- German language support (
--lang de) - 24h cache with daily warmup (cron at 00:30)
- HTTP API mode
License
Internal project.