voicevox-mcp
该项目是一个MCP(模型上下文协议)服务器,与VOICEVOX引擎配合,合成语音并获取说话人信息。它是用 TypeScript 实现的,并使用 MCP SDK。
功能
获取 VOICEVOX 引擎的扬声器信息 (/speakers)
在指定的扬声器上将文本合成为语音并在本地播放(/speak)
仅限 Mac
设置
启动 VOICEVOX 引擎(推荐使用 Docker)
docker compose up -d
这将在 localhost:50021 上启动 VOICEVOX 引擎。
安装并构建依赖项
npm install
npm run build
如何使用
光标设置示例
{
"mcpServers": {
"voicevox-mcp": {
"command": "node",
"args": ["${Path to Repository}/dist/index.js"],
"env": {
"SPEAKER_ID": 8,
"SPEED_SCALE": 1.2,
"VOICEVOX_API_URL": "http://localhost:50021"
}
}
}
}
根据需要设置VOICEVOX_API_URL。
您可以使用发言者工具从 MCP 客户端获取发言者列表。
语音工具可以将文本合成为语音并在本地播放(建议使用 Mac,因为它使用 afplay 命令)。
主要依赖项
@modelcontextprotocol/sdk
zod
typescript
防范措施
未来的改进
除非 VOICEVOX 引擎在 localhost:50021 上运行,否则语音合成将不可用。
如果您使用Mac以外的环境,请相应地更改afplay部分。
执照
MIT 许可证
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议服务器与 VOICEVOX 引擎集成,提供文本到语音合成和说话人信息检索,允许用户从文本生成和播放语音音频。
Related Resources
Related MCP Servers
- -securityFlicense-qualityProvides text-to-speech capabilities through the Model Context Protocol, allowing applications to easily integrate speech synthesis with customizable voices, adjustable speech speed, and cross-platform audio playback support.Last updated -10
- -securityAlicense-qualityA 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.Last updated -161MIT License
- -securityFlicense-qualityEnables seamless integration with Typecast API through the Model Context Protocol, allowing clients to manage voices, convert text to speech, and play audio in a standardized way.Last updated -2
Gladia MCPofficial
-securityAlicense-qualityOfficial Model Context Protocol server that enables interaction with powerful Speech-to-Text and Audio Intelligence APIs, allowing clients like Claude Desktop to transcribe audio, analyze speech, translate content, and more.