Skip to main content
Glama

transcribe_speech

Convert speech audio to text with automatic language detection for WAV, MP3, WEBM, and OGG files. Provides transcription and identified language.

Instructions

Transcribe speech audio into text.

Supports multiple languages with automatic language detection. Returns the transcription text and detected language.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_base64YesBase64-encoded audio to transcribe (WAV, MP3, WEBM, OGG)
languageNoOptional language hint, e.g. 'en', 'pt'. Auto-detected if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:74-91 (handler)
    The main handler function for the transcribe_speech tool. It accepts base64-encoded audio and an optional language hint, then makes an HTTP POST request to the Brainiall API's /v1/stt/transcribe endpoint to perform speech-to-text transcription.
    @mcp.tool()
    async def transcribe_speech(
        audio_base64: Annotated[str, "Base64-encoded audio to transcribe (WAV, MP3, WEBM, OGG)"],
        language: Annotated[Optional[str], "Optional language hint, e.g. 'en', 'pt'. Auto-detected if omitted."] = None,
    ) -> dict:
        """Transcribe speech audio into text.
    
        Supports multiple languages with automatic language detection.
        Returns the transcription text and detected language.
        """
        payload: dict = {"audio_base64": audio_base64}
        if language:
            payload["language"] = language
    
        async with _client() as client:
            response = await client.post("/v1/stt/transcribe", json=payload)
            response.raise_for_status()
            return response.json()
  • Input schema definition using Python type annotations with Annotated. Defines two parameters: audio_base64 (required string with format hints) and language (optional string for language detection hint).
    async def transcribe_speech(
        audio_base64: Annotated[str, "Base64-encoded audio to transcribe (WAV, MP3, WEBM, OGG)"],
        language: Annotated[Optional[str], "Optional language hint, e.g. 'en', 'pt'. Auto-detected if omitted."] = None,
    ) -> dict:
  • server.py:74-74 (registration)
    The @mcp.tool() decorator registers the transcribe_speech function as an MCP tool with the FastMCP framework.
    @mcp.tool()
  • Helper function that creates an async HTTP client configured with the Brainiall API base URL, authorization headers, and timeout settings. Used by the transcribe_speech handler to make API requests.
    def _client() -> httpx.AsyncClient:
        return httpx.AsyncClient(
            base_url=API_BASE,
            headers=_headers,
            timeout=60.0,
        )
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about language support (multiple languages with auto-detection) and return values (transcription text and detected language), which goes beyond basic function. However, it doesn't cover important behavioral aspects like rate limits, authentication requirements, error conditions, or processing time expectations.

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

Conciseness5/5

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

The description is perfectly concise with three sentences that each earn their place. The first states the core function, the second adds important capability context (language support), and the third specifies return values. No wasted words, and information is appropriately front-loaded.

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

Completeness4/5

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

Given that there's an output schema (which handles return value documentation) and 100% schema description coverage, the description provides adequate context. It covers the core function, language capabilities, and return structure. However, for a tool with no annotations, it could better address behavioral aspects like performance characteristics or error handling.

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 description coverage is 100%, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. It mentions language detection generally but doesn't provide additional context about the 'language' parameter or 'audio_base64' requirements beyond what the schema already states.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Transcribe') and resource ('speech audio into text'). It distinguishes from siblings like 'assess_pronunciation' (which evaluates speech quality) and 'synthesize_speech' (which generates speech), but doesn't explicitly contrast with 'list_voices' (which lists available voices). The purpose is clear but sibling differentiation could be more explicit.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'transcribe_speech' over 'assess_pronunciation' for speech analysis, or when transcription is appropriate versus other audio processing tools. There's only implied usage through the description's functional statement.

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/fasuizu-br/brainiall-mcp-server'

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