Media
Создает аудио с тишиной заданной длительности
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/audio-silence-generator' \
-H 'Content-Type: application/json' \
-d '{"duration":5,"sampleRate":"44100","channels":"2","outputFormat":"mp3"}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/audio-silence-generator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| duration | number | Нет | — |
| sampleRate | select | Нет | — |
| channels | select | Нет | — |
| outputFormat | 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, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-audio-silence-generator": {
"name": "audio-silence-generator",
"description": "Создает аудио с тишиной заданной длительности",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=audio-silence-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "audio-silence-generator",
"arguments": {
"duration": 5,
"sampleRate": "44100",
"channels": "2",
"outputFormat": "mp3"
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]