A MCP server for CosyVoice TTS using DashScope API
Project description
cosyvoice-mcp
A Python-based MCP server for integrating CosyVoice TTS with the Bailian platform.
Installation
pip install cosyvoice-mcp
Usage
DASHSCOPE_API_KEY=sk-xxx cosyvoice-mcp
Features
Supports JSON-RPC over HTTP (streamable-http) Compatible with FastMCP and DashScope TTS Base64-encoded audio output
Request
stdio
tool: text_to_speech
说明:调用百炼平台CosyVoice V2进行语音合成
streamable-http
- url: http://localhost:8000/mcp/tools/text_to_speech
- method: POST
Parameters
- text: text string to be synthesized
- voice_type: Such as the enumeration value of longxiaocheng_v2. Please refer to https://help.aliyun.com/zh/model-studio/cosyvoice-python-api?spm=a2c4g.11186623.0.i2#fbe0209896w38
返回
{
"request_id": "7f6da1729d7345babb976d497f8bfaaa",
"output": {
"audio": {
"data": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Lj...", //base64 encoded audio
"mime_type": "audio/mpeg",
"file_name": "哈哈_longxiaocheng_v2.mp3"
},
"metrics": {
"first_byte_latency": 738.578125,
"text_length": 2
}
}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cosyvoice_mcp-0.6.0.tar.gz
(4.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cosyvoice_mcp-0.6.0.tar.gz.
File metadata
- Download URL: cosyvoice_mcp-0.6.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d938ef624158b3f572b0cfffc808b34610acfbbd68a5a3bb344c33e970c5b8a
|
|
| MD5 |
06e5ce7594c0b3153be378a0249ee1b5
|
|
| BLAKE2b-256 |
734402db3cc45639500cec268c980625e498fd05659cd676e225d0cf026d54a2
|
File details
Details for the file cosyvoice_mcp-0.6.0-py3-none-any.whl.
File metadata
- Download URL: cosyvoice_mcp-0.6.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9431b0bac91ace51ec226e1bf781868d6a185e40d949b004d8af65f91ef392a5
|
|
| MD5 |
797b8e739ff90db2c203cf4621af53ac
|
|
| BLAKE2b-256 |
6855a7e010b274644e93c8398c5135c9d3a5dc4149f04a823a1fe3a5defb1a0e
|