sing_over_instrumental
Add AI-generated vocals to instrumental tracks by providing lyrics and selecting a voice model, enabling users to create complete songs with synthesized singing.
Instructions
Add AI-generated vocals over an instrumental track
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instrumental_url | Yes | URL of the instrumental audio file | |
| lyrics | Yes | Lyrics to sing | |
| voice_id | Yes | Voice model ID to use for singing (use get_all_voices to find IDs) | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:1183-1203 (handler)Handler function that executes the tool: validates required parameters (instrumental_url, lyrics, voice_id), forwards the request to the MusicGPT API endpoint '/sing_over_instrumental', and returns task status information.private async handleSingOverInstrumental(args: any) { if (!args.instrumental_url || !args.lyrics || !args.voice_id) { throw new McpError(ErrorCode.InvalidParams, "instrumental_url, lyrics, and voice_id are required"); } const response = await this.axiosInstance.post("/sing_over_instrumental", { instrumental_url: args.instrumental_url, lyrics: args.lyrics, voice_id: args.voice_id, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Singing over instrumental 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:493-518 (schema)Input schema definition for the tool, specifying required parameters: instrumental_url, lyrics, voice_id, and optional webhook_url.{ name: "sing_over_instrumental", description: "Add AI-generated vocals over an instrumental track", inputSchema: { type: "object" as const, properties: { instrumental_url: { type: "string", description: "URL of the instrumental audio file", }, lyrics: { type: "string", description: "Lyrics to sing", }, voice_id: { type: "string", description: "Voice model ID to use for singing (use get_all_voices to find IDs)", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["instrumental_url", "lyrics", "voice_id"], }, },
- src/index.ts:709-710 (registration)Registration in the tool dispatch switch statement: maps tool name to the handleSingOverInstrumental handler.case "sing_over_instrumental": return await this.handleSingOverInstrumental(args);
- src/index.ts:645-650 (registration)Registration of the tools list handler, which includes the sing_over_instrumental tool schema via the TOOLS array.this.server.setRequestHandler( ListToolsRequestSchema, async () => ({ tools: TOOLS, }) );
- src/index.ts:68-68 (helper)Tool type constant used in get_conversion_by_id helper tool for polling status of sing_over_instrumental conversions."SING_OVER_INSTRUMENTAL",