语音合成服务

一个基于Rust和Gemini TTS的本地语音合成服务,可将文本转换为语音并播放。

  • by balheru
  • Rust
  • 本地部署
  • 更新于
在 GitHub 查看 balheru/mcp-speak

使用说明

mcp-speak

Give Claude Code a voice. Rust MCP server that calls Gemini TTS and plays audio locally.

Install

git clone https://github.com/balheru/mcp-speak.git
cd mcp-speak
GEMINI_API_KEY="your-key" cargo build --release

Get a key at aistudio.google.com/apikey. Requires macOS and Rust.

Configure

Add to ~/.claude.json:

{
  "mcpServers": {
    "speak": {
      "command": "/path/to/mcp-speak/target/release/mcp-speak"
    }
  }
}

Usage

The server exposes a single speak tool:

Parameter Type Required Description
text string yes The text to speak aloud
style string no Speech style/emotion (e.g. "excited", "calm and reassuring")

Details

  • Voice: Kore
  • Model: gemini-2.5-pro-preview-tts
  • Audio: 24kHz mono 16-bit PCM
  • Protocol: MCP over stdio

License

MIT