mcp-audio 是一个符合 AIO-2030 标准的 MCP 插件,它使用音频语音识别 API 进行语音转文字的转换。
它通过 multipart/form-data 和 base64 格式暴露了 identify_voice 方法,支持 AIO 的 tools.call 协议,并返回 JSON-RPC 结构化的输出。
/tools.call, /help).wav/.mp3 音频文件转换成文本.env 文件安全地管理 API 密钥git clone git@github.com:AIO-2030/mcp-audio.git
cd mcp-audio
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
设置您的音频 URL 和 API 密钥:
AUDIO_URL=https--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python src/mcp_server.py
docker build -t mcp-audio .
docker run --env-file .env -p 8080:8080 mcp-audio
直接上传音频文件。响应:
{
"transcript": "hello world",
"confidence": 0.91,
"audio_hash": "a1b2c3..."
}
使用 base64 编码音频的 JSON-RPC 格式。响应:
{
"method": "tools.call",
"params": {
"method": "identify_voice",
"inputs": [
{
"type": "audio",
"value": "<base64-audio>"
}
]
}
}
自动提供 mcp_audio_registration.json 的内容。用于 Queen AI 的 MCP 发现和服务索引。
python test/test_audio_base64.py
python health_check.py
./register_mcp.sh
需要 jq, dfx 和正在运行的 endpoint_registry 容器。