Skip to main content
Glama
Dosugamea

Voicevox MCP Server

by Dosugamea

Voicevox MCP 服务器

这是通过 MCP(模型上下文协议)使用 VOICEVOX 兼容语音合成服务器(AivisSpeech / VOICEVOX / COEIROINK)的服务器。它可以用于使用 Cursor 等中的 Claude 3.7 在代理模式下进行语音合成。

先决条件

Windows 环境

Docker 环境(WSL2)

  • Docker 和 Docker Compose

  • WSL2

  • VOICEVOX ENGINE 等(本地运行或在 Docker 中运行)

  • sudo apt install libsdl2-dev pulseaudio-utils pulseaudio的Linux环境

  • /mnt/wslg的访问权限

Related MCP server: TTS-MCP

安装和配置

  1. 克隆存储库

git clone https://github.com/Dosugamea/voicevox-mcp-server.git
cd voicevox-mcp-server
  1. 安装依赖项

npm install
  1. 设置环境变量通过复制.env_example并根据需要修改设置来创建.env文件:

VOICEVOX_API_URL=http://localhost:50021
VOICEVOX_SPEAKER_ID=1

如何做

在Windows环境中执行

请按照以下步骤从编辑器单独启动服务器。

npm run build
npm start

Docker环境中执行

无需单独的编辑器或操作。它不能直接执行,因为它以 stdio 模式启动。

如何设置

在 Windows 环境中运行时

请将以下内容添加到 mcp.json。连接不稳定,如果断开,请重新连接。

        "voicevox": {
            "url": "http://localhost:10100/sse"
        }

在 Docker 环境中运行时

请将以下内容添加到 mcp.json。 (作者环境未测试。)

{
    "tools": {
        "voicevox": {
            "command": "cmd",
            "args": [
                "/c",
                "docker",
                "run",
                "-i",
                "--rm",
                "-v",
                "/mnt/wslg:/mnt/wslg",
                "-e",
                "PULSE_SERVER",
                "-e",
                "SDL_AUDIODRIVER",
                "-e",
                "VOICEVOX_API_URL",
                "-e",
                "VOICEVOX_SPEAKER_ID",
                "your-local-docker-image-name"
            ],
            "env": {
                "PULSE_SERVER": "unix:/mnt/wslg/PulseServer",
                "SDL_AUDIODRIVER": "pulseaudio",
                "VOICEVOX_API_URL": "http://host.docker.internal:50031",
                "VOICEVOX_SPEAKER_ID": "919692871"
            }
        }
    }
}

关于Speaker ID

扬声器 ID 根据您使用的 VOICEVOX 型号而有所不同。默认使用“1”(四国金属)。如果您想使用其他扬声器 ID,请更改环境变量VOICEVOX_SPEAKER_ID

可以在 VOICEVOX ENGINE API 的/speakers端点找到说话者 ID 列表。例如: curl http://localhost:50021/speakers

故障排除

  • VOICEVOX 连接错误:请确保 VOICEVOX ENGINE 正在运行并且 API URL 设置正确。

  • 没有播放声音:确保 VLC 已正确安装并位于您的路径中。

  • Docker 环境中的音频输出问题:请检查 pulseaudio 是否配置正确。

开发者信息

  • 要为源代码做出贡献,请创建问题或提交拉取请求。

  • 要报告错误或请求功能,请使用 GitHub 上的问题功能。

执照

MIT 许可证

A
license - permissive license
B
quality
F
maintenance

Maintenance

0Releases (12mo)

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Tools

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • AI voice generation: text-to-speech and voice cloning from any MCP client.

  • MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)

  • MCP server for Text-to-Speech

View all MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol server that integrates high-quality text-to-speech capabilities with Claude Desktop and other MCP-compatible clients, supporting multiple voice options and audio formats.
    17
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A Node.js server that enables AI assistants to interact with Bouyomi-chan's text-to-speech functionality through Model Context Protocol (MCP), allowing for voice reading of text with adjustable parameters.
    1
    2
    MIT

View all related MCP servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dosugamea/voicevox-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server