neuroverse_transcribe
Convert audio files to text using Whisper speech-to-text technology for transcription tasks.
Instructions
Transcribe an audio file to text using Whisper STT.
Args:
audio_path (string): Absolute path to the audio file
Returns: JSON with the transcribed text
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_path | Yes | Absolute path to the audio file to transcribe |
Implementation Reference
- npm/src/index.ts:439-444 (handler)The tool handler for "neuroverse_transcribe" that calls the transcription service.
async (params) => { const text = await transcribeAudio(params.audio_path); return { content: [{ type: "text" as const, text: JSON.stringify({ text }, null, 2) }], }; } - npm/src/core/voice.ts:32-43 (handler)The implementation logic for audio transcription.
export async function transcribeAudio(audioPath: string): Promise<string> { if (!config.whisperEndpoint) throw new Error("Whisper endpoint not configured."); // Note: For a real implementation, you'd use form-data and passing the file stream. // This serves as the integration pattern. try { const response = await axios.post( config.whisperEndpoint, { file_path: audioPath }, // Adjust based on your Whisper REST API spec { headers: { "Content-Type": "application/json" } } ); return response.data.text ?? "Transcription returned empty."; - npm/src/index.ts:414-418 (schema)Zod schema definition for input validation of the transcribe tool.
const TranscribeSchema = z .object({ audio_path: z.string().min(1).describe("Absolute path to the audio file to transcribe"), }) .strict(); - npm/src/index.ts:420-438 (registration)Registration of the "neuroverse_transcribe" tool in the MCP server.
server.registerTool( "neuroverse_transcribe", { title: "Transcribe Audio", description: `Transcribe an audio file to text using Whisper STT. Args: - audio_path (string): Absolute path to the audio file Returns: JSON with the transcribed text`, inputSchema: TranscribeSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, },