Skip to main content
Glama

recognize_audio_file

Transcribe local audio files into accurate text using offline speech recognition. Improve results by providing optional context or specifying the language.

Instructions

识别本地音频文件中的文本

参数:

  • file_path: 本地音频文件路径

  • context: 上下文文本,用于提高识别准确率(可选)

  • language: 指定语言代码(如 'zh', 'en'),可选,默认自动检测

  • model: 语音识别模型(可选,默认使用qwen3-asr-flash)

返回:

  • 识别的文本内容

注意: 使用本机 faster-whisper,默认 medium / CPU int8,不消耗 API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
contextNo
languageNo
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and delivers: it discloses local inference via faster-whisper, the default 'medium / CPU int8' engine, and zero API consumption. A minor flaw is the internal inconsistency between the model parameter's stated default 'qwen3-asr-flash' and the faster-whisper medium default, but the core safety/cost behavior is clearly revealed.

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?

The description is cleanly organized—purpose, parameters, returns, and a behavioral note—with the purpose statement front-loaded. The parameter block earns its place because the schema has no descriptions at all, so it is not redundant, though the layout is conventional rather than exceptionally tight.

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?

For a 4-parameter tool with no annotations, the description is largely complete: it covers purpose, all parameters, the return value ('识别的文本内容'), and operational context in one place. It omits supported audio formats, file-size/duration limits, and error behavior, which would round it out for a local ASR tool.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by documenting every parameter: file_path as a local path, context as an accuracy-improving optional text, language with 'zh'/'en' examples and auto-detection default, and model with its default. This is exactly the semantic meaning the bare input schema lacks.

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?

The opening line '识别本地音频文件中的文本' states a specific verb (识别/recognize), a resource (audio files), and a scope qualifier (本地/local), so an agent knows immediately this transcribes local audio. The '本地' qualifier also distinguishes it from the sibling recognize_audio_url, which targets remote audio.

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?

The description gives clear usage context: it operates on local file paths via '本机 faster-whisper' with CPU int8 and notes '不消耗 API', signaling an offline, no-cost transcription use case. However, it never explicitly names the alternative (recognize_audio_url) or states when not to use this tool, leaving sibling routing to inference.

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