Skip to main content
Glama

kobold_transcribe

Convert audio files into text transcriptions using Whisper AI technology. Ideal for processing speech-to-text tasks with customizable language options and API integration.

Instructions

Transcribe audio using Whisper

Input Schema

NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001
audioYes
languageNo

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "apiUrl": { "default": "http://localhost:5001", "type": "string" }, "audio": { "type": "string" }, "language": { "type": "string" } }, "required": [ "audio" ], "type": "object" }

Implementation Reference

  • Core handler logic for the kobold_transcribe tool (shared with other POST endpoints). It retrieves the endpoint and schema from postEndpoints map, validates input arguments, proxies a POST request to the KoboldAI server at `${apiUrl}/api/extra/transcribe`, and returns the JSON response as text content.
    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:208-212 (registration)
    Registers the kobold_transcribe tool in the MCP server's listTools response, providing name, description, and input schema.
    { name: "kobold_transcribe", description: "Transcribe audio using Whisper", inputSchema: zodToJsonSchema(TranscribeSchema), },
  • Defines the Zod input schema for kobold_transcribe: apiUrl (from BaseConfigSchema), required audio (string), optional language.
    const TranscribeSchema = BaseConfigSchema.extend({ audio: z.string(), language: z.string().optional(), });
  • src/index.ts:335-335 (registration)
    Internal registration mapping kobold_transcribe to its proxy endpoint '/api/extra/transcribe' and schema in the postEndpoints lookup table used by the handler.
    kobold_transcribe: { endpoint: '/api/extra/transcribe', schema: TranscribeSchema },
  • Helper function used by the handler to make HTTP requests to the KoboldAI backend 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(); }

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/PhialsBasement/KoboldCPP-MCP-Server'

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