Skip to main content
Glama

voice-mcp

Local-first macOS voice daemon & MCP server to talk directly to your coding agents (Claude Code, Antigravity, or any stdio MCP client) — an open-source, privacy-aware alternative to Wispr Flow with real-time barge-in.


Why voice-mcp?

Instead of dictating text and reading walls of markdown back, voice-mcp combines:

  1. System-wide Fn keyboard daemon (voice-daemon) with a native macOS menu bar icon (🎙️ / 🔊 / 🔴):

    • Hold Fn (≥ 200 ms, pre-capture at t=0 + 250 ms tail): Open Space silent dictation — streams speech to Gradium STT and pastes cleanly at your cursor anywhere on macOS without pressing Enter.

    • Double-tap Fn (< 400 ms): Direct Voice Interaction mode — listens hands-free with semantic turn detection, pastes [mode vocal] <transcript> and presses Enter so your agent summarizes in chat + replies aloud with Noémie and instant barge-in.

  2. Stdio MCP Server (voice-mcp) exposing ecouter, parler, dialoguer, and statut_voix, synchronized with the shared oral / ecrit mode (~/.cache/voice-mcp/mode.json).


Related MCP server: sidevoice-connector

Architecture

Microphone (24 kHz PCM, in-memory only)
   │
   ├─► Gradium STT WebSocket (eu.api.gradium.ai)
   │     • Semantic VAD (2.0 s horizon) & keyword boosting (keywords.yaml)
   │     • Barge-in RMS detector cuts TTS in < 80 ms with 480 ms pre-roll
   │
   ├─► Coding Agent (Claude Code / Antigravity via MCP stdio)
   │     • Keeps all workspace tools, skills & safety guardrails
   │     • Outputs 3–5 bullet summary in chat + 2 short spoken sentences
   │
   └─► Gradium Phonon TTS (100% local via ptts, 0 API credits)
         • Default voice: Noémie (15 FR voices cached on demand)
         • Hot-plug audio device refresh (headset / speakers)

Installation

Prerequisites: macOS (Apple Silicon / Intel), Python 3.11–3.13, uv.

git clone https://github.com/Exawyll/voice-mcp.git
cd voice-mcp
uv sync --python 3.12

1. Configure API Key & Local Settings

cp .env.example .env

Edit .env and set your Gradium API key (free tier available at gradium.ai, routed to EU endpoint eu.api.gradium.ai by default):

GRADIUM_API_KEY=your_gradium_api_key

(Optional) Copy keywords.local.yaml.example to keywords.local.yaml (gitignored) to boost your own domain acronyms and project terms.


Quick Test (CLI)

# Check config (key redacted) and audio devices
uv run voice-test status

# List available French Phonon voices
uv run voice-test voices

# Test local TTS (0 credits)
uv run voice-test tts "Bonjour, je suis Noémie." --voice Noémie

# Test streaming STT
uv run voice-test stt --timeout 20

# Test real-time barge-in (interrupt while speaking)
uv run voice-test bargein

Connect to Coding Agents (MCP)

Claude Code

claude mcp add --scope user voice-mcp -- \
  uv --directory /path/to/voice-mcp run voice-mcp

Antigravity (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "voice-mcp": {
      "command": "/path/to/uv",
      "args": [
        "--directory",
        "/path/to/voice-mcp",
        "run",
        "voice-mcp"
      ]
    }
  }
}

Global Agent Rule (~/.claude/CLAUDE.md / ~/.gemini/GEMINI.md)

- If a message starts with `[mode vocal]`, show a short 3–5 bullet summary in chat and reply aloud via `dialoguer()` in 2 short sentences max.
- Without `[mode vocal]` (or when Open Space silent mode is active), reply in text only.

macOS Keyboard Daemon & Auto-Start (LaunchAgent)

One-time macOS Permissions

  1. System Settings > Keyboard: Press 🌐 key to → Do Nothing.

  2. Privacy & Security > Input Monitoring: allow your Terminal / Python binary.

  3. Privacy & Security > Accessibility: allow your Terminal / Python binary (for Cmd+V / Return paste).

Run Manually or Install at Login

# Verify macOS permissions
uv run voice-daemon --check-permissions

# Run interactively with menu bar icon
uv run voice-daemon

# Install and start automatically at macOS login
# (packages ~/Applications/VoiceMCP.app so Microphone & Accessibility permissions stick cleanly)
uv run voice-daemon --install-launchagent

# Stop and remove LaunchAgent
uv run voice-daemon --uninstall-launchagent

Logs when running via LaunchAgent: ~/Library/Logs/voice-mcp-daemon.log. Note: --install-launchagent creates ~/Applications/VoiceMCP.app on macOS so Microphone and Accessibility permissions apply cleanly to VoiceMCP instead of a generic Python binary.


Privacy, Security & Licensing

  • No audio stored on disk: microphone audio stays in memory and is streamed only to the configured Gradium region (eu by default).

  • Local TTS output: Phonon runs 100% locally on-device, so agent replies never leave your machine.

  • Secrets safety: .env and keywords.local.yaml are gitignored; GRADIUM_API_KEY is never exposed in statut_voix() or error messages; native macOS truststore (truststore) handles corporate TLS proxies without disabling certificate verification.

  • Licensing:

    • voice-mcp source code: MIT (LICENSE).

    • Underlying Phonon weights: phonon-31m-en is Apache 2.0; phonon-40m-fr (used for French voices such as Noémie) is CC BY-NC 4.0 (non-commercial — commercial license available from Gradium, or switch VOICE_TTS_BACKEND=say / gradium).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Adds voice conversation capabilities to AI agents via MCP, enabling local speech recognition and synthesis with tools like speak, listen, and ask_by_voice for interactive voice interactions.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables coding agents to participate in voice calls, speaking replies while continuing their work and accepting spoken input or interruptions within the same conversation. It delivers voice input into Claude Code, Codex, Cursor, or custom HTTP endpoint workflows.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to hold spoken conversations by exposing speech-to-text and text-to-speech tools over MCP, routing them to a local daemon that drives a Chrome window using on-device speech recognition and Piper synthesis. It supports listening, speaking, and reading files aloud within a Claude Code plugin or an MCP gateway.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables hands-free voice collaboration with a coding agent: you speak requirements aloud and hear only short, plain-language progress and completion summaries while the agent edits code, runs tests, and fixes bugs in the background. It also handles continuous speech recognition with automatic turn detection, barge-in interruption, and spoken approval prompts before risky operations.
      1
      MIT