Charan Tej Mandali

Voice Assistant

AI 智慧體v0.1.0
作者:Charan Tej Mandali更新於 2026-05-11voice-assistant@clawhub_charantejmandali18/voice-assistant
Agent 框架任務自動化工具呼叫#Audio

據 AlphaMoat 統計,截至 2026-09,Voice Assistant 累計下載 3,020 次、獲 4 個星標,在全部 5,078 個 AI 技能中排名第 3,718 位,在「AI 智慧體」分類(969 個)中排名第 751 位。

累計安裝
160
累計下載
3020
星標
4
全站排名
#3,718
全站前 74% · 「AI 智慧體」前 78%
平台累計安裝累計下載星標評論
ClawHub ↗9029014-
SkillHub ↗16030204—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

瀏覽器語音介面連線 OpenClaw 閘道器,可設定語音識別和合成。音訊、轉寫和產生文字可能傳送至第三方並寫入記錄檔;使用可信網路、限制閘道器權限,避免傳輸未獲批准的敏感內容。 需要 Python/uv、已設定執行的 OpenClaw Gateway、麥克風權限與所選 STT/TTS 分支的 Deepgram 或 ElevenLabs 憑證。服務無驗證,綁定 localhost,對外開放前加驗證與 Origin 檢查;審查記錄,不傳送未獲准敏感語音。

資料釋出於 2026-10-27

可以用來做什麼

  • 為獲准 OpenClaw 代理設定瀏覽器語音介面

什麼時候用

  • 語音服務處理與 Gateway 工具存取已獲准時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

啟動前審核語音服務商、localhost 綁定與 Gateway 權限,暫不錄音或傳送音訊。

月度資料趨勢

累計下載3020
1719241831162026-03 · 累計下載 18152026-05 · 累計下載 22802026-07 · 累計下載 26772026-08 · 累計下載 27972026-09 · 累計下載 302026-0326-09
星標4
3452026-03 · 星標 42026-05 · 星標 42026-07 · 星標 42026-08 · 星標 42026-09 · 星標 426-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093020—4
2026-082797+4.5%4
2026-072677—4
2026-052280—4
2026-031815—4

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

5.6 KB · ClawHub v0.1.0
---
name: voice-assistant
description: Real-time voice assistant for OpenClaw. Streams mic audio through configurable STT (Deepgram or ElevenLabs) into your OpenClaw agent, then speaks the response via configurable TTS (Deepgram Aura or ElevenLabs). Sub-2s time-to-first-audio with full streaming at every stage.
metadata:
  openclaw:
    emoji: "🎙️"
    requires:
      bins: ["uv"]
      env: []
    primaryEnv: "VOICE_STT_PROVIDER"
展開全部(共 141 行)
    install:
      - id: "uv"
        kind: "brew"
        formula: "uv"
        bins: ["uv"]
        label: "Install uv (brew)"
---

# Voice Assistant

Real-time voice interface for your OpenClaw agent. Talk to your agent and hear it respond — with configurable STT and TTS providers, full streaming at every stage, and sub-2 second time-to-first-audio.

## Architecture

```
Browser Mic → WebSocket → STT (Deepgram / ElevenLabs) → Text
  → OpenClaw Gateway (/v1/chat/completions, streaming) → Response Text
  → TTS (Deepgram Aura / ElevenLabs) → Audio chunks → Browser Speaker
```

The voice interface connects to your running OpenClaw gateway's OpenAI-compatible endpoint. It's the same agent with all its context, tools, and memory — just with a voice.

## Quick Start

```bash
cd {baseDir}
cp .env.example .env
# Fill in your API keys and gateway URL
uv run scripts/server.py
# Open http://localhost:7860 and click the mic
```

## Supported Providers

### STT (Speech-to-Text)
| Provider   | Model            | Latency  | Notes                        |
|-----------|------------------|----------|------------------------------|
| Deepgram  | nova-2 (streaming) | ~200-300ms | WebSocket streaming, best accuracy/speed |
| ElevenLabs | Scribe v1        | ~300-500ms | REST-based, good multilingual |

### TTS (Text-to-Speech)
| Provider    | Model        | Latency  | Notes                          |
|------------|--------------|----------|--------------------------------|
| Deepgram   | aura-2       | ~200ms   | WebSocket streaming, low cost  |
| ElevenLabs | Turbo v2.5   | ~300ms   | Best voice quality, streaming   |

## Configuration

All configuration is via environment variables in `.env`:

```bash
# === Required ===
OPENCLAW_GATEWAY_URL=http://localhost:4141/v1    # Your OpenClaw gateway
OPENCLAW_MODEL=claude-sonnet-4-5-20250929        # Model your gateway routes to

# === STT Provider (pick one) ===
VOICE_STT_PROVIDER=deepgram                      # "deepgram" or "elevenlabs"
DEEPGRAM_API_KEY=your-key-here                   # Required if STT=deepgram
ELEVENLABS_API_KEY=your-key-here                 # Required if STT=elevenlabs

# === TTS Provider (pick one) ===
VOICE_TTS_PROVIDER=elevenlabs                    # "deepgram" or "elevenlabs"
# Uses the same API keys as above

# === Optional Tuning ===
VOICE_TTS_VOICE=rachel                           # ElevenLabs voice name/ID
VOICE_TTS_VOICE_DG=aura-2-theia-en              # Deepgram Aura voice
VOICE_VAD_SILENCE_MS=400                         # Silence before end-of-turn (ms)
VOICE_SAMPLE_RATE=16000                          # Audio sample rate
VOICE_SERVER_PORT=7860                           # Server port
VOICE_SYSTEM_PROMPT=""                           # Optional system prompt override
```

## Provider Combinations

| Setup                              | Best For                        |
|------------------------------------|---------------------------------|
| Deepgram STT + ElevenLabs TTS     | Best quality voice output        |
| Deepgram STT + Deepgram TTS       | Lowest latency, single vendor    |
| ElevenLabs STT + ElevenLabs TTS   | Best multilingual support        |

## How It Works

1. **Browser captures mic audio** via Web Audio API and streams raw PCM over a WebSocket
2. **Server receives audio** and pipes it to the configured STT provider's streaming endpoint
3. **STT returns partial transcripts** in real-time; on end-of-utterance the full text is sent to the OpenClaw gateway
4. **OpenClaw gateway streams** the LLM response token-by-token via SSE (Server-Sent Events)
5. **Tokens are accumulated** into sentence-sized chunks and streamed to the TTS provider
6. **TTS returns audio chunks** that are immediately forwarded to the browser over the same WebSocket
7. **Browser plays audio** using the Web Audio API with a jitter buffer for smooth playback

## Interruption Handling (Barge-In)

When the user starts speaking while the agent is still talking:
- Current TTS audio is immediately cancelled
- The agent stops its current response
- New STT session begins capturing the user's interruption

## Usage Examples

```
User: "Hey, set up my voice assistant"
→ OpenClaw runs: cd {baseDir} && cp .env.example .env
→ Opens .env for the user to fill in API keys
→ Runs: uv run scripts/server.py

User: "Start a voice chat"
→ Opens http://localhost:7860 in the browser

User: "Switch TTS to Deepgram"
→ Updates VOICE_TTS_PROVIDER=deepgram in .env
→ Restarts the server
```

## Troubleshooting

- **No audio output?** Check that your TTS API key is valid and the provider is set correctly
- **High latency?** Use Deepgram for both STT and TTS; ensure your gateway is on the same network
- **Cuts off speech?** Increase `VOICE_VAD_SILENCE_MS` to 600-800ms
- **Echo/feedback?** Use headphones, or enable the built-in echo cancellation in the browser UI

## Latency Budget

| Stage                    | Target    | Actual (typical) |
|-------------------------|-----------|------------------|
| Audio capture + VAD     | <200ms    | ~100-150ms       |
| STT transcription       | <400ms    | ~200-400ms       |
| OpenClaw LLM first token| <1500ms   | ~500-1500ms      |
| TTS first audio chunk   | <400ms    | ~200-400ms       |
| **Total first audio**   | **<2.5s** | **~1.0-2.5s**    |

「AI 智慧體」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。