extend_audio
Generate AI-powered audio continuations to extend music tracks or sound recordings. Provide an audio URL and specify extension duration to create seamless additions to existing audio content.
Instructions
Extend an audio track using AI to generate continuation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | URL of the audio file to extend | |
| extension_duration | No | Duration to extend in seconds | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:1140-1158 (handler)The handler function that executes the extend_audio tool logic by posting to the /extend API endpoint.private async handleExtendAudio(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/extend", { audio_url: args.audio_url, extension_duration: args.extension_duration, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio extension started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], };
- src/index.ts:445-466 (schema)Input schema for the extend_audio tool defining parameters and validation.{ name: "extend_audio", description: "Extend an audio track using AI to generate continuation", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to extend", }, extension_duration: { type: "number", description: "Duration to extend in seconds", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
- src/index.ts:705-706 (registration)Switch case registration that routes extend_audio tool calls to the handler method.case "extend_audio": return await this.handleExtendAudio(args);