transcribe_audio
Convert speech in audio files to text for transcription, supporting multiple languages and optional webhook notifications.
Instructions
Transcribe speech from audio to text
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | URL of the audio file to transcribe | |
| language | No | Language code (e.g., 'en', 'es', 'fr') | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:1209-1228 (handler)The handler function that implements the core logic of the transcribe_audio tool by making an API call to /audiotranscribe endpoint.private async handleTranscribeAudio(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/audiotranscribe", { audio_url: args.audio_url, language: args.language, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio transcription 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:524-541 (schema)Input schema defining parameters for the transcribe_audio tool including audio_url (required), language, and webhook_url.inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to transcribe", }, language: { type: "string", description: "Language code (e.g., 'en', 'es', 'fr')", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], },
- src/index.ts:522-542 (registration)Tool registration object in the TOOLS array that defines the tool's metadata and schema for MCP list tools request.name: "transcribe_audio", description: "Transcribe speech from audio to text", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to transcribe", }, language: { type: "string", description: "Language code (e.g., 'en', 'es', 'fr')", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
- src/index.ts:713-714 (registration)Switch case in the CallTool request handler that registers and routes transcribe_audio calls to its handler function.case "transcribe_audio": return await this.handleTranscribeAudio(args);