kobold_transcribe
Convert audio files to text using Whisper speech recognition technology for transcription and analysis.
Instructions
Transcribe audio using Whisper
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiUrl | No | http://localhost:5001 | |
| audio | Yes | ||
| language | No |
Implementation Reference
- src/index.ts:346-358 (handler)Handler logic that dispatches kobold_transcribe by validating input with TranscribeSchema, forwarding POST request to KoboldAI /api/extra/transcribe endpoint, and returning the response.if (postEndpoints[name]) { const { endpoint, schema } = postEndpoints[name]; const parsed = schema.safeParse(args); if (!parsed.success) { throw new Error(`Invalid arguments: ${parsed.error}`); } const result = await makeRequest(`${apiUrl}${endpoint}`, 'POST', requestData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], isError: false, }; }
- src/index.ts:54-57 (schema)Zod schema defining input for kobold_transcribe tool: optional apiUrl (from BaseConfigSchema), required audio string, optional language.const TranscribeSchema = BaseConfigSchema.extend({ audio: z.string(), language: z.string().optional(), });
- src/index.ts:208-212 (registration)Registers kobold_transcribe tool in ListTools response with name, description, and inputSchema.{ name: "kobold_transcribe", description: "Transcribe audio using Whisper", inputSchema: zodToJsonSchema(TranscribeSchema), },
- src/index.ts:335-335 (registration)Maps kobold_transcribe tool name to its KoboldAI endpoint and schema for dispatch in CallTool handler.kobold_transcribe: { endpoint: '/api/extra/transcribe', schema: TranscribeSchema },
- src/index.ts:146-162 (helper)Helper function used by all POST tool handlers, including kobold_transcribe, to make HTTP requests to KoboldAI API.async function makeRequest(url: string, method = 'GET', body: Record<string, unknown> | null = null) { const options: RequestInit = { method, headers: body ? { 'Content-Type': 'application/json' } : undefined, }; if (body && method !== 'GET') { options.body = JSON.stringify(body); } const response = await fetch(url, options); if (!response.ok) { throw new Error(`KoboldAI API error: ${response.statusText}`); } return response.json(); }