Mcp_cosyvoice
About
Mcpcosyvoice is a Python-based MCP server that calls the Ali CosyVoice1 API to convert text input into audio and saves the resulting file to a user-specified directory. It is intended for developers who need to integrate text-to-speech functionality into MCP-compatible AI…
Details
- Author
- 943003797
- Downloads
- 124
- Categories
- Other
Jump to
- Converts text to audio using the Ali CosyVoice1 API.
- Saves generated audio files to a specified directory.
- Runs as an MCP server for easy integration with AI frameworks.
- Managed via uv for dependency and environment setup.
Create and activate a Python virtual environment with uv venv .venv, then install dependencies with uv sync. The server is invoked via stdio, for example in Autogen by passing StdioServerParams with command="uv", args=["--directory", "../../Mcp/Mcp_cosyvoice", "run", "main.py"], and the environment variable ALI_KEY set to your API key.
📝 简介
本项目是一个基于Python的Mcp server应用程序,用于调用Ali CosyVoice1接口,转换Text为音频到指定目录。
🚀 使用步骤
创建Python 虚拟环境
uv venv .venv激活虚拟环境(Windows)
.venv\Scripts\activate安装项目依赖
uv syncAutogen中调用
```bash shiciToAudio = await mcp_server_tools( StdioServerParams( command="uv", args=[ "--directory", "../../Mcp/Mcp_cosyvoice", "run", "main.py" ], env={ "ALI_KEY": "API_KEY", } ) )Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



