Skip to main content
Glama

x402_transcribe_audio

Transcribe audio files from URLs into text with automatic language detection, supporting MP3, WAV, M4A, FLAC, OGG and other formats. Returns transcript text, detected language, timestamps, and duration.

Instructions

Transcribe an audio file from a URL using faster-whisper with auto language detection. Price: $0.05 USDC per transcription (paid mode) | Free test: returns fixture data.

Supports: MP3, WAV, M4A, FLAC, OGG, and most audio formats. Limits: 25MB file size, 10-minute duration. Payment is charged on download; duration refusals are still charged. Note: transcription can take 30–120 seconds for longer files (CPU-based, requests queue serially). Without X402_PRIVATE_KEY, only the free test endpoint is available.

Returns: transcript text, detected language, language confidence, duration, and segment or word timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the audio file to transcribe (public, http/https, max 25MB, max 10 min)
languageNoISO 639-1 language hint (e.g. 'en', 'fr', 'es') — omit for auto-detection
word_timestampsNoReturn word-level timestamps instead of segment-level (default: false)

Implementation Reference

  • The tool 'x402_transcribe_audio' is registered and implemented in src/index.ts. It handles both paid (via X402_PRIVATE_KEY) and free test modes.
    server.tool(
      "x402_transcribe_audio",
      `Transcribe an audio file from a URL using faster-whisper with auto language detection.
    Price: $0.05 USDC per transcription (paid mode) | Free test: returns fixture data.
    
    Supports: MP3, WAV, M4A, FLAC, OGG, and most audio formats.
    Limits: 25MB file size, 10-minute duration. Payment is charged on download; duration refusals are still charged.
    Note: transcription can take 30–120 seconds for longer files (CPU-based, requests queue serially).
    Without X402_PRIVATE_KEY, only the free test endpoint is available.
    
    Returns: transcript text, detected language, language confidence, duration, and segment or word timestamps.`,
      {
        url: z.string().url().describe("URL of the audio file to transcribe (public, http/https, max 25MB, max 10 min)"),
        language: z.string().optional()
          .describe("ISO 639-1 language hint (e.g. 'en', 'fr', 'es') — omit for auto-detection"),
        word_timestamps: z.boolean().default(false)
          .describe("Return word-level timestamps instead of segment-level (default: false)"),
      },
      async (params) => {
        const base = APIS.transcription.baseUrl;
        try {
          const usePaid = !!PRIVATE_KEY;
          if (usePaid) {
            const payload: Record<string, unknown> = {
              url: params.url,
              word_timestamps: params.word_timestamps,
            };
            if (params.language) payload.language = params.language;
            const data = await apiPost(base, "/transcribe", payload, true);
            return textResult({ mode: "paid", cost: "$0.05", ...data });
          } else {
            const data = await apiGet(base, "/transcribe/test");
            return textResult({
              mode: "free_test",
              note: "Free test — returns fixture data. Set X402_PRIVATE_KEY for real audio transcription.",
              ...data,
            });
          }
        } catch (err: any) {
          return errorResult(err.message);
        }
      }
    );
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description comprehensively covers: charging behavior (charged on download, refusals still charged), performance characteristics (30-120s, CPU-based, serial queue), format support, hard limits (25MB/10min), and authentication requirements. Critical behavioral traits fully disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information-dense with logical flow: purpose → pricing → limits → timing → auth → returns. Six sentences with zero waste given the operational complexity (payment API). Slightly dense but appropriately front-loaded with critical cost/pricing info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, description explicitly lists all return fields (transcript, language, confidence, duration, timestamps). Covers all operational necessities for a paid API: auth, pricing, file constraints, and async timing expectations. Complete for the complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. Description reinforces concepts (e.g., 'auto language detection' aligns with optional language param, 'word timestamps' referenced in returns) but does not add significant semantic depth beyond well-documented schema fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear specific verb ('Transcribe'), resource ('audio file'), implementation detail ('faster-whisper'), and key feature ('auto language detection'). Unambiguous scope distinguishes it clearly from sibling tools like convert_file or scrape_url.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit prerequisites (X402_PRIVATE_KEY for paid mode), cost model ($0.05 USDC), and free test alternative. Lacks explicit comparison to specific sibling alternatives, but clearly delineates between free test and paid usage modes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/jameswilliamwisdom/x402-mcp-server'

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