Zonos MCP集成
Zonos TTS的模型上下文协议集成,允许Claude直接生成语音。
设置
通过Smithery安装
通过以下方式自动安装Zonos TTS Integration for Claude Desktop 史密瑟里:```bash
npx -y @smithery/cli install @PhialsBasement/zonos-tts-mcp --client claude
### 手动安装
1. 请确保Zonos与我们的API实现一起运行(PhialsBasement/zonos api)
1. 安装依赖项:```bash
npm install @modelcontextprotocol/sdk axios
- 配置PulseAudio访问:```bash
Your pulse audio should be properly configured for audio playback
The MCP server will automatically try to connect to your pulse server
4. 构建MCP服务器:```bash
npm run build
# This will create the dist folder with the compiled server
- 添加到Claude的配置文件中:
编辑您的Claude配置文件(通常在~/.config/claude/config.json)并将其添加到mcpServers章节:```json
"zonos-tts": {
"command": "node",
"args": [
"/path/to/your/zonos-mcp/dist/server.js"
]
}
替换 `/path/to/your/zonos-mcp` 使用安装MCP服务器的实际路径。
## 与克劳德一起使用
配置后,Claude会自动知道如何使用 `speak_response` 工具:```python
speak_response(
text="Your text here",
language="en-us", # optional, defaults to en-us
emotion="happy" # optional: "neutral", "happy", "sad", "angry"
)
特性
- 通过Claude实现文本转语音
- 多种情绪支持
- 通过PulseAudio正确播放音频
需求
- Node.js
- PulseAudio设置
- 正在运行Zonos API实例(PhialsBasement/Zonos-API)
- 工作音频输出设备
备注
- 确保Zonos API服务器和此MCP服务器都在运行
- 音频播放需要正确的PulseAudio配置