Skip to main content
Glama

change_audio_speed

Adjust audio playback speed by specifying a multiplier to slow down or speed up audio files from a URL.

Instructions

Change the playback speed of audio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesURL of the audio file to process
speed_factorYesSpeed multiplier (e.g., 1.5 for 1.5x speed, 0.75 for 0.75x speed)
webhook_urlNoURL for callback upon completion

Implementation Reference

  • Handler function that validates the input arguments (audio_url and speed_factor), sends a POST request to the '/audio_speed_changer' API endpoint with optional webhook_url, and returns a text response with the task details and instructions to check status.
    private async handleChangeAudioSpeed(args: any) { if (!args.audio_url || !args.speed_factor) { throw new McpError(ErrorCode.InvalidParams, "audio_url and speed_factor are required"); } const response = await this.axiosInstance.post("/audio_speed_changer", { audio_url: args.audio_url, speed_factor: args.speed_factor, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio speed change started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
  • Input schema defining the parameters for the change_audio_speed tool: required audio_url (string) and speed_factor (number), optional webhook_url (string).
    inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to process", }, speed_factor: { type: "number", description: "Speed multiplier (e.g., 1.5 for 1.5x speed, 0.75 for 0.75x speed)", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "speed_factor"], },
  • src/index.ts:383-404 (registration)
    Tool definition in the TOOLS constant array, which is returned by the listTools handler. Includes name, description, and inputSchema.
    { name: "change_audio_speed", description: "Change the playback speed of audio", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to process", }, speed_factor: { type: "number", description: "Speed multiplier (e.g., 1.5 for 1.5x speed, 0.75 for 0.75x speed)", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "speed_factor"], }, },
  • src/index.ts:699-700 (registration)
    Switch case in the callTool request handler that dispatches execution of 'change_audio_speed' to the specific handler method.
    case "change_audio_speed": return await this.handleChangeAudioSpeed(args);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pasie15/mcp-server-musicgpt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server