Skip to content

ayushmothiya/openclaw-plugins

Repository files navigation

smallest-voice-bridge

Discord voice bridge extension for OpenClaw with:

  • wakeword detection via OpenWakeWord
  • one-shot buffered STT via Smallest.ai
  • TTS replies in Discord voice
  • recording mode for event / meeting capture

This extension is designed for voice-first OpenClaw workflows where you want to join a Discord voice channel, wake the assistant with a keyword, speak naturally, and get a spoken reply.

Features

  • /join command to bring the bot into your current Discord voice channel
  • Wakeword-triggered voice prompts
  • Buffered single-shot prompt transcription after silence
  • Spoken responses via Smallest.ai TTS
  • Recording mode with transcript and summary pipeline
  • Status command handling during recording mode

Requirements

  • OpenClaw >=2026.3.22
  • Node.js compatible with your OpenClaw install
  • Python 3.10+
  • ffmpeg available on PATH
  • Smallest.ai API key
  • Discord bot token configured in OpenClaw

Python dependencies

Install the wakeword-side dependencies in your Python environment:

pip install openwakeword numpy onnxruntime

Depending on your system, you may also need:

pip install scipy

Install

Option 1: local development install

Clone the repo into your OpenClaw extensions folder:

git clone <YOUR_GITHUB_REPO_URL> "%USERPROFILE%\\.openclaw\\extensions\\smallest-voice-bridge"

Option 2: OpenClaw extension path install

If your OpenClaw setup supports extension path installs, point it at this folder/repo and enable the plugin in config.

OpenClaw config

Example plugin config:

{
  "plugins": {
    "entries": {
      "smallest-voice-bridge": {
        "enabled": true,
        "config": {
          "apiKey": "YOUR_SMALLEST_API_KEY",
          "wakeword": {
            "enabled": true,
            "pythonBin": "python",
            "scriptPath": "C:\\Users\\<you>\\.openclaw\\extensions\\smallest-voice-bridge\\oww_stream.py",
            "modelPath": "",
            "modelName": "hey mycroft",
            "threshold": 0.6,
            "vadThreshold": 0.5,
            "patience": 3,
            "debounceSec": 1.5,
            "commandWindowMs": 6000,
            "minAutoReplyScore": 0.85,
            "wakeCooldownMs": 2500,
            "ttsSuppressWakeMs": 1200,
            "minPromptChars": 6,
            "shortPromptHoldMs": 1200,
            "repromptText": "",
            "ackMode": "earcon"
          }
        }
      }
    }
  }
}

Discord config

Make sure OpenClaw Discord is enabled and your bot token is set.

Usage

  1. In Discord text chat, run:
/join
  1. Join the same voice channel as the bot.
  2. Say the configured wakeword, for example:
hey mycroft
  1. After the earcon, say your prompt.

Recording mode

To start recording:

start recording

To stop recording:

stop recording

To ask for progress / status:

status

Recording artifacts are stored under:

~/.openclaw/workspace/notes/event-recordings/YYYY-MM-DD/

Notes

  • Wakeword behavior depends a lot on mic quality, room acoustics, and pronunciation.
  • ffmpeg must be installed and accessible from the shell OpenClaw uses.
  • This extension currently assumes mono 16 kHz PCM for wakeword and prompt capture.
  • During recording mode, conversation should be treated as transcript-only and should not route as a live assistant prompt.

Troubleshooting

Wakeword sidecar spawned but no detection

  • verify Python is available
  • verify openwakeword imports correctly
  • verify model name / model path

STT fails

  • verify Smallest API key
  • verify outbound network access
  • verify ffmpeg is installed

Bot joins but no voice response

  • verify Discord voice permissions
  • verify TTS connectivity
  • check OpenClaw logs for player state transitions

Development

Main files:

  • index.js — OpenClaw extension entry point
  • src/voice-session.js — wake -> capture -> STT -> routing flow
  • src/wakeword.js — wakeword sidecar management and gating
  • src/stt.js — full-audio transcription helper
  • src/tts.js — speech synthesis and playback
  • src/recording.js — recording mode and artifact generation
  • oww_stream.py — OpenWakeWord streaming sidecar

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors