Skip to main content
Glama

Doubao TTS MCP

by lxy2109

项目简介

本项目旨在将火山引擎TTS官方API封装为标准MCP协议工具,支持在 Cursor、Claude 等平台通过自然语言参数调用,实现一键语音合成。适用于需要自定义音色、参数映射、自动化批量语音生成的开发者场景。


doubao_tts_mcp 使用说明

快速开始

0. 克隆项目代码

git clone https://github.com/lxy2109/doubao-tts-mcp.git cd doubao-tts-mcp

Python环境准备

  • 本项目需 Python 3.8 及以上版本。
  • 推荐使用 Python官网 下载并安装最新版。
  • 安装完成后,命令行输入 python --versionpython3 --version 检查版本。

1. 安装依赖

pip install -r requirements.txt

2. 安装本地包(支持命令行调用)

pip install -e .

3. 配置环境变量

可在 .envmcp.jsonenv 字段中设置: (获取方式:https://console.volcengine.com/speech/service/10007)

  • VOLC_APPID
  • VOLC_TOKEN
  • PORT(如需自定义端口)
  • OUTPUT_DIR(音频输出目录)

4. 命令行启动服务

doubao-tts-mcp

5. cursor mcp.json 配置示例

{ "mcpServers": { "doubao_tts_mcp": { "command": "doubao-tts-mcp", "args": [], "env": { "VOLC_APPID": "你的appid", "VOLC_TOKEN": "你的token", "PORT": "5001", "OUTPUT_DIR": "D:/doubao_tts_mcp/output" } } } }

6. 在 Cursor/Claude 等平台使用

  • 平台会自动读取 mcp.json 并用命令行方式启动 MCP 服务。
  • 在 MCP 面板填写参数即可一键合成音频。
  • 合成结果会返回音频文件的绝对路径,文件保存在指定目录下。

7. 常见问题

  • Q:如何让 MCP 工具支持命令行调用?
    • A:请确保 pyproject.toml 配置了 entry_points,并用 pip install -e . 安装本地包。
  • Q:比特率及采样率无法调整?
    • A:由于 MCP 工具 schema 类型校验限制,bitrate 和 rate 参数暂不可用,建议用默认值。
  • Q:音色、情感、语速等参数如何填写?
    • A:支持自然语言关键词(如"少女""萝莉"),会自动智能映射到官方音色。

示例调用

{ "text": "测试声音参数", "voice_type": "少女", "speed_ratio": 0.8, "emotion": "happy", "output_filename": "少女音色测试" }

参考

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

A Model Context Protocol server that wraps Volcengine's Text-to-Speech API, allowing users to generate speech from text using natural language parameters for customizing voice type, emotion, and speed.

  1. doubao_tts_mcp 使用说明
    1. 快速开始
    2. Python环境准备
    3. 示例调用
    4. 参考

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    Provides 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 -
    6
    Python
  • -
    security
    A
    license
    -
    quality
    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.
    Last updated -
    14
    1
    TypeScript
    MIT License
  • -
    security
    A
    license
    -
    quality
    Official 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 -
    2
    Python
    MIT License
  • A
    security
    A
    license
    A
    quality
    Model Context Protocol server that enables interaction with Mobvoi's Text to Speech and Voice Clone APIs, allowing MCP clients like Cursor, Claude Desktop, and Cline to generate speech and clone voices.
    Last updated -
    4
    1
    Python
    MIT License
    • Apple
    • Linux

View all related MCP servers

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/lxy2109/doubao-tts-mcp'

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