Skip to main content
Glama

DeepSeek 语音合成

deepseek_tts

Converts text into WAV or PCM speech audio, saves the file to disk, and returns its path for playback or downstream use. Use it for narration or voice output when an audio file is needed.

Instructions

把文字合成为语音(wav 或 pcm),音频落盘并返回路径。不调用对话模型,按计费字符计费(3 元/万字符,限时 5 折 1.5 元;汉字算 2 个字符)。注意:MCP 内容块不含 audio,无法直接播放,需用播放器打开返回的路径。长文本单次调用可能阻塞数分钟,建议每段 ≤2000 字符。

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": {
      "text": "<text>"
    },
    "name": "deepseek_tts"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes要朗读的文本,计费字符上限 10,000(汉字算 2)。
formatNowav 为完整的音频文件;pcm 是 24 kHz / 16 位 / 单声道裸数据。wav
voice_idNostella 海星(女声,默认)或 tide 暗潮(男声)。stella
output_pathNo可选:音频写入路径(支持 ~ 展开,必须是绝对路径)。省略时写入 DEEPSEEK_AUDIO_DIR 下的时间戳文件;已存在或扩展名不匹配会拒绝。设置 DEEPSEEK_ALLOWED_DIRS 时必须落在白名单内。
filter_markdownNo朗读前是否去掉 Markdown 标记。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes well past the annotations by disclosing the side effect (audio written to disk with a returned path), the billing model (3 元/万字符, 5 折, 汉字算 2 个字符), the blocked-call risk on long input, and the important integration caveat that MCP content blocks contain no audio so the path must be opened externally. The only shortfall is that it does not mention failure modes such as path collision or extension mismatch, which are covered by the annotations.

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?

Four tight sentences with the purpose first, then cost, then the playback caveat, then the length advice. Each sentence adds a distinct operational fact and nothing is repeated from the input schema.

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?

With no output schema, the description correctly states what is returned (a file path) and how to consume it, and it covers cost, latency, and segmentation for a 5-parameter generative tool. An agent has everything needed to call it correctly and to budget requests.

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%, so the schema carries formats, voices, and path rules; nonetheless the description adds real meaning by tying the text length to billing characters and the ≤2000-character segmentation advice, which is not in the schema. This compensates for the one thing the schema does not express: cost and latency scaling with input size.

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?

Opens with a specific verb and resource (把文字合成为语音) plus the concrete output forms (wav 或 pcm) and the delivery mechanism (音频落盘并返回路径). It also pre-empts confusion with the chat-model siblings by stating 不调用对话模型, so an agent can immediately tell this is a file-producing TTS call rather than a text generation or transcription call.

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?

Gives actionable conditions: use it to synthesize audio, keep segments ≤2000 characters, and expect blocking on long text. It does not name an alternative tool, but the sibling set (ASR/OCR/search/fetch) contains no real substitute, so the only missing element is an explicit 'not for X' exclusion.

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