tts-mcp
使用 OpenAI TTS API 生成高质量文本转语音的模型上下文协议 (MCP) 服务器和命令行工具。
主要特点
- MCP 服务器:将文本转语音功能与 Claude Desktop 和其他兼容 MCP 的客户端集成
- 语音选项:支持多个语音角色(合金、新星、回声等)
- 高品质音频:支持各种输出格式(MP3、WAV、OPUS、AAC)
- 可定制:配置语速、语音特征和附加说明
- CLI 工具:也可用作命令行实用程序,用于直接进行文本到语音的转换
安装
方法 1:从存储库安装
方法二:直接用npx运行(无需安装)
MCP 服务器使用情况
MCP 服务器允许您将文本转语音功能与模型上下文协议 (MCP) 兼容客户端(如 Claude Desktop)集成。
启动 MCP 服务器
MCP 服务器选项
与 MCP 客户端集成
MCP 服务器可与 Claude Desktop 及其他兼容 MCP 的客户端一起使用。Claude Desktop 集成步骤如下:
- 打开 Claude Desktop 配置文件(通常位于
~/Library/Application Support/Claude/claude_desktop_config.json
) - 添加以下配置,包括您的 OpenAI API 密钥:
或者,您可以使用 npx 进行更简单的设置:
您可以通过两种方式提供 API 密钥:
- 直接方法(建议测试):使用
--api-key
参数将其包含在args
数组中 - 环境变量法(更安全):如上图在
env
对象中设置
安全注意事项:包含 API 密钥时,请确保配置文件的安全。
- 重启Claude桌面
- 当你要求克劳德“大声朗读这段文字”或类似请求时,文本将转换为语音
可用的 MCP 工具
- 文本转语音:将文本转换为语音并播放的工具
CLI 工具使用
您还可以将 tts-mcp 用作独立的命令行工具:
CLI 工具选项
支持的声音
支持以下语音角色:
- 合金(默认)
- 灰
- 珊瑚
- 回声
- 寓言
- 缟玛瑙
- 新星
- 圣人
- 闪光
支持的型号
- tts-1
- tts-1-hd
- gpt-4o-mini-tts(默认)
输出格式
支持以下输出格式:
- mp3(默认)
- 作品
- 音频
- flac
- 音频
- 脉冲编码调制
环境变量
您还可以使用系统环境变量配置该工具:
执照
麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器将高质量文本转语音功能与 Claude Desktop 和其他 MCP 兼容客户端相集成,支持多种语音选项和音频格式。
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 -2Python
- -securityFlicense-qualityA Model Context Protocol server that provides text-to-speech capabilities using the Kokoro TTS model, offering multiple voice options and customizable speech parameters.Last updated -239JavaScript
ElevenLabs MCP Serverofficial
AsecurityAlicenseAqualityAn official Model Context Protocol (MCP) server that enables AI clients to interact with ElevenLabs' Text to Speech and audio processing APIs, allowing for speech generation, voice cloning, audio transcription, and other audio-related tasks.Last updated -19700PythonMIT LicenseGladia MCPofficial
-security-license-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.Last updated -PythonMIT License