Media
用侧链压缩混合两条音轨(如旁白或广告音频时压低背景音乐)
用三种语言从你的代码中调用此工具。
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/audio-sidechain-compress' \
-F 'file=@/path/to/mainAudio.ext'
curl -X POST 'https://api.elysiatools.com/upload/audio-sidechain-compress' \
-F 'file=@/path/to/sidechainAudio.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/zh/api/tools/audio-sidechain-compress' \
-F 'mainAudio=/path/to/file.ext' \
-F 'sidechainAudio=/path/to/file.ext' \
-F 'offset=e.g., 5 or 00:00:05' \
-F 'threshold=-20dB' \
-F 'ratio=4' \
-F 'attack=20' \
-F 'release=300' \
-F 'outputFormat=mp3' \
-F 'sampleRate=auto' \
-F 'channels=auto'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/audio-sidechain-compress| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| mainAudio | file需先上传 | 是 | — |
| sidechainAudio | file需先上传 | 是 | — |
| offset | text | 否 | — |
| threshold | text | 否 | — |
| ratio | text | 否 | — |
| attack | text | 否 | — |
| release | text | 否 | — |
| outputFormat | select | 否 | — |
| sampleRate | select | 否 | — |
| channels | select | 否 | — |
文件结果
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-audio-sidechain-compress": {
"name": "audio-sidechain-compress",
"description": "用侧链压缩混合两条音轨(如旁白或广告音频时压低背景音乐)",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=audio-sidechain-compress",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "audio-sidechain-compress",
"arguments": {
"mainAudio": "https://example.com/file.ext",
"sidechainAudio": "https://example.com/file.ext",
"offset": "e.g., 5 or 00:00:05",
"threshold": "-20dB",
"ratio": "4",
"attack": "20",
"release": "300",
"outputFormat": "mp3",
"sampleRate": "auto",
"channels": "auto"
}
}
}有问题或反馈?请联系 [email protected]