Discord voice assistant and generators
This repository has been archived on 2026-07-08. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • TypeScript 80.5%
  • Python 8%
  • JavaScript 6.8%
  • Shell 2.3%
  • CSS 1.3%
  • Other 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Leon Stöwer b58319e535 docs: Add generator READMEs and overview
- 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
2026-02-04 23:10:35 +01:00
email-analyzer feat(email-analyzer): Phase 1 - Email ingestion + Kimi K2 API foundation 2026-02-04 12:00:38 +01:00
generators docs: Add generator READMEs and overview 2026-02-04 23:10:35 +01:00
shared fix: Auto-restart STT and TTS subprocesses on crash 2026-02-03 17:38:01 +01:00
voice-bot Remove duplicate radio-streams.ts from voice-bot (moved to generators) 2026-02-04 23:08:09 +01:00
voice-typer docs: add comprehensive voice-typer implementation plan 2026-02-04 13:20:28 +01:00
.gitignore feat: Replace XTTS v2 with Piper TTS (faster, simpler) 2026-02-03 09:35:32 +01:00
email-analyzer-plan.md fix: Load .env in config.ts to fix voice-bot login issue 2026-02-04 14:40:59 +01:00
MUSIC_PLAYER_FIX_REPORT.md fix: radio streaming cleanup + reduce ffmpeg spam logging 2026-02-04 17:13:26 +01:00
README.md docs: Update all README.md files with current features and examples 2026-02-04 10:55:49 +01:00
SUBAGENT_COMPLETION_SUMMARY.md fix: radio streaming cleanup + reduce ffmpeg spam logging 2026-02-04 17:13:26 +01:00
tsconfig.base.json Convert codebase from JavaScript to TypeScript 2026-02-03 08:26:49 +01:00

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

  1. Capture — Audio from Discord (Opus 48kHz stereo)
  2. STT — faster-whisper (GPU, large-v3) transcribes speech
  3. Wake word — Detects "bot"/"god"/"pot" + variants, filters filler words
  4. LLM — OpenClaw Gateway generates a response
  5. TTS — Piper TTS (local, CPU-based, German/English)
  6. Playback — Audio streamed back to the voice channel

Requirements

  • Linux (WSL2 supported)
  • Node.js 22+ / Bun (for converter)
  • Python 3.10+ with faster-whisper and piper-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 channel
  • GET http://localhost:18790/health — Health check + active sessions
  • GET http://localhost:18790/status — Uptime and session count

Converter

  • GET http://localhost:3456/convert?amount=20&from=PLN&to=USD — Convert currency
  • GET http://localhost:3456/commodities — List all commodities
  • GET http://localhost:3456/currencies?base=USD — List available currencies
  • GET 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.