sing_over_instrumental
Generate AI vocals for instrumental tracks by providing lyrics and selecting a voice model. Add custom singing to music files through automated vocal synthesis.
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)The main handler function that validates input parameters and makes a POST request to the MusicGPT API endpoint '/sing_over_instrumental' to add AI-generated vocals over an instrumental track, returning task details.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-517 (schema)The tool schema definition including input validation schema with required fields: instrumental_url, lyrics, voice_id.{ 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)The switch case in the CallToolRequestSchema handler that routes calls to the sing_over_instrumental tool to its handler function.case "sing_over_instrumental": return await this.handleSingOverInstrumental(args);
- src/index.ts:68-68 (helper)Enum value in the conversionType schema for get_conversion_by_id tool, used to poll status of sing_over_instrumental tasks."SING_OVER_INSTRUMENTAL",