Skip to main content
Glama

语音转文字(同步,短音频)

speech_to_text

转写 ≤ 60 秒、≤ 8MB 的短音频,同步返回文本与分段。计费工具(占 1 次当日 ASR 额度,失败不扣)。audioUrl 必须是公网可访问 URL(wav/mp3/m4a);本地文件路径无法使用。更长的音频改用 submit_asr_job 提交异步任务。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "audioUrl": "<audioUrl>"
    },
    "name": "speech_to_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNo语种,auto 自动判定(默认)
engineNo引擎:默认 standard(免费);premium 需付费档,商业模型按积分计费
audioUrlYes音频公网 URL,≤ 8MB 且 ≤ 60 秒

Output Schema

NameRequiredDescriptionDefault
textNo
quotaNo
engineNo
durationNo
languageNo
segmentsNo
requestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses the billing model (consumes one daily ASR quota), the failure policy (failures are not charged), and the synchronous behavior. It does not explain the consequences of retrying a non-idempotent, quota-consuming call. Also, the non-readOnlyHint is implicitly justified by the quota consumption, so there is no contradiction.

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 four dense sentences, front-loaded with the audio limits and return mode. The cost information and the escalation path to the async sibling follow in a logical, waste-free order.

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 tool of moderate complexity whose return values are covered by an output schema, the description covers limits, cost, format, and alternatives. The only material gap is that retry or failure output behavior beyond 'not charged' is left unstated.

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

Parameters4/5

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

Schema coverage is 100% and the schema already documents audioUrl's public-URL requirement and size/duration limits. The description adds constraints beyond the schema by naming the accepted formats (wav/mp3/m4a) and warning that local paths will not work. It also mentions premium billing for the engine parameter.

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 description gives a precise verb (转写) and resource (短音频 ≤ 60 秒、≤ 8MB), and it specifies the synchronous return of text and segments. It also clearly distinguishes this tool from the async sibling submit_asr_job, which handles longer audio.

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

Usage Guidelines5/5

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

It states the exact conditions for choosing this tool (audio ≤ 60s and ≤ 8MB), gives an explicit alternative when those limits are exceeded (submit_asr_job), and rules out local file paths. It leaves no ambiguity about when this tool is or is not appropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources