Skip to main content

ThunderClap - Voice Command System

    ## Overview
    Full voice integration system for senbot with wake word, STT, TTS, and conversational AI.
    
    ## Hardware
    - **Speaker**: USB Speaker Bar (detected via ALSA/PulseAudio)
    - **Microphone**: USB Audio Interface
    - **Status**: ✅ Audio playback verified working (2026-03-01)
    
    ## Docker Containers
    
    ### STT (Speech-to-Text)
    - **Image**: `linuxserver/faster-whisper`
    - **Port**: 8001
    - **API**: HTTP REST
    - **Model**: whisper-base (default)
    - **Status**: ✅ Running
    
    ### TTS (Text-to-Speech)
    - **Image**: `rhasspy/wyoming-piper`
    - **Port**: 10200
    - **API**: Wyoming protocol (HTTP + UDP events)
    - **Voice**: en_US-lessac-medium.onnx
    - **Status**: ✅ Running
    
    ## Components
    
    ### Wake Word
    - **Engine**: Porcupine or Snowboy
    - **Wake Word**: "Hey Senbot" (configurable)
    
    ### Speech-to-Text (STT)
    - **Engine**: Faster Whisper (CTranslate2 optimized Whisper)
    - **Model**: whisper-base
    - **API Endpoint**: http://localhost:8001
    
    ### Text-to-Speech (TTS)
    - **Engine**: Piper TTS via Wyoming
    - **Voice**: en_US-lessac-medium.onnx
    - **API Endpoint**: http://localhost:10200
    
    ### NLP/Intent
    - **LLM**: Ollama (qwen3:14b, llama3:8b)
    - **Mode**: Conversational or command-based
    
    ## Architecture
    
    ```
    [USB Microphone] -> [STT Docker:8001] -> [Ollama LLM] -> [TTS Docker:10200] -> [USB Speaker]
    ```
    
    ## Configuration
    See `src/config.py`
    
    ## Model Upgrade Options (For Future Review)
    - **STT**: Distil-Whisper Large V3 (5-6x faster, ~5GB VRAM, MIT license)
    - **STT**: Canary Qwen 2.5B (best WER 5.63%, ~6GB VRAM)
    - **TTS**: Coqui TTS (alternative to Piper)
    
    ## Status
    - IN PROGRESS
    - Audio hardware working ✅
    - Docker containers running ✅
    - Python modules implemented ✅
    - End-to-end test pending
    # Senbot Voice System
    
    Full voice integration for senbot with wake word, speech-to-text, LLM processing, and text-to-speech.
    
    ## Features
    
    - **Wake Word Detection** - Always listening for "Senbot" or custom wake words
    - **Microphone Capture** - High-quality audio capture from system microphones
    - **Speech-to-Text** - Convert voice to text using Whisper (via Ollama)
    - **LLM Processing** - Process commands through Ollama (llama3, qwen, etc.)
    - **Text-to-Speech** - Speak responses using Piper TTS
    - **Conversational Mode** - Multi-turn dialogue without repeat wake word
    - **Recording Mode** - Save voice sessions to files
    
    ## Architecture
    
    ```
    ┌─────────────────────────────────────────────────────────────┐
    │                    VOICE SYSTEM                              │
    ├─────────────────────────────────────────────────────────────┤
    │  ┌──────────┐    ┌──────────┐    ┌──────────┐              │
    │  │ Wake Word│───▶│ Microphone│───▶│   STT    │              │
    │  │ Listener │    │  Capture  │    │ (Whisper)│              │
    │  └──────────┘    └──────────┘    └────┬─────┘              │
    │                                        │                    │
    │                                        ▼                    │
    │  ┌──────────┐    ┌──────────┐    ┌──────────┐             │
    │  │  Speaker │◀───│   TTS    │◀───│    LLM   │             │
    │  │  Output  │    │ (Piper)  │    │ (Ollama) │             │
    │  └──────────┘    └──────────┘    └──────────┘             │
    ├─────────────────────────────────────────────────────────────┤
    │  Modes: Wake | Listen | Speak | Record                      │
    └─────────────────────────────────────────────────────────────┘
    ```
    
    ## Installation
    
    ```bash
    # Install dependencies
    pip install pyaudio numpy pvporcupine requests
    
    # Install Piper TTS
    # See: https://github.com/rhasspy/piper
    
    # Start Ollama with whisper model
    ollama serve &
    ollama pull whisper
    ```
    
    ## Usage
    
    ### CLI
    
    ```bash
    # Start voice system
    python -m senbot.voice.cli start
    
    # Check status
    python -m senbot.voice.cli status
    
    # List audio devices
    python -m senbot.voice.cli devices
    
    # Test speak
    python -m senbot.voice.cli speak --text "Hello world"
    
    # Stop
    python -m senbot.voice.cli stop
    ```
    
    ### Python API
    
    ```python
    from senbot.voice import get_voice_processor
    
    # Get processor
    vp = get_voice_processor()
    
    # Start
    vp.start()
    
    # Status
    print(vp.get_status())
    
    # Speak something
    vp.speak("Hello! I am online.")
    
    # Stop
    vp.stop()
    ```
    
    ## Configuration
    
    Edit `config.yaml`:
    
    ```yaml
    voice:
      wake_words:
        - senbot
        - computer
      sample_rate: 16000
      command_timeout: 5
      conversational_mode: false
      
    ollama:
      url: http://localhost:11434
      model: llama3:8b
      
    tts:
      model: en_US-lessac-medium
    ```
    
    ## Requirements
    
    - Python 3.8+
    - PyAudio
    - Ollama running with:
      - whisper (STT)
      - llama3:8b or qwen3:14b (LLM)
    - Piper TTS (optional, for local TTS)
    
    ## Status
    
    🔄 IN PROGRESS - Core pipeline built, need to:
    - [ ] Test with actual audio hardware
    - [ ] Download whisper model to Ollama
    - [ ] Set up Piper TTS server
    - [ ] Add proper error handling
    - [ ] Add configuration file

Metadata

Release files for thunderclap 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for thunderclap 0.3.0
File Interpreter ABI Platform Actions
thunderclap-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details for thunderclap-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl

Release files / thunderclap-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL thunderclap-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl
Size 57.5 kB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
34d30384699e8d1eed5e1642cb962e5d004823b05567b72c739782ccf62dd448
BLAKE2b-256 checksum
How to use checksums
7e7a6a5c71d37715b1e446242e22c261db37ebcf09c4831fc0de4ad5f2fef5b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for thunderclap 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page