Doubao TTS: Using Doubao TTS for Text-to-Speech in Agents

Preface

In conversational Agents, the common approach for voice broadcasting is to integrate the Volcano Engine or Doubao Open Platform TTS SDK separately, handling authentication, parameters, and audio file saving manually. Furthermore, switching clients (Cursor, Claude Code, Codex, etc.) often requires repeatedly instructing the model on “which interface to call and what the fields are called.”

The following section introduces doubao tts on SkillHub (located at @user_f95f21b8/dlazy-doubao-tts). It encapsulates Doubao TTS into a universal SKILL.md instruction. Agents can simply execute dlazy doubao-tts as per the documentation to complete synthesis, with text and voice parameters forwarded to the dLazy hosted API via the CLI.

What is this

doubao tts is currently at version 1.0.9, categorized as design-media, and sourced from the community (publisher user_f95f21b8). The official description is: Synthesize text into natural and fluent speech using Doubao TTS.

The skill itself acts as a thin wrapper for the dLazy CLI (@dlazy/cli@1.0.9, maintained by dlazyai): prompts and parameters such as --voice_language, --voiceId, and --speed_ratio are processed via inference at api.dlazy.com, and the resulting media URLs are returned from files.dlazy.com. The SkillHub page indicates requires_api_key=true, meaning a dLazy API Key must be configured before use.

Core Functionality

Based on SKILL.md / SKILL-cn.md within the skill package, the verified capabilities include:

  1. Text-to-Speech: Calls Doubao TTS (modelId: doubao-tts) via dlazy doubao-tts --prompt '<text>'.
  2. Language and Voice: --voice_language supports zh-cn (default) and en; --voiceId varies by language. The default for Chinese is zh_female_shuangkuaisisi_uranus_bigtts (Shuangkuaisisi 2.0), and the documentation lists multiple Chinese and English voice IDs.
  3. Speed: --speed_ratio supports 0.8, 1.0, 1.2, 1.5, 2.0, with a default of 1.0.
  4. Debugging and Async: --dry-run prints the request body and cost estimate only; --no-wait returns a generateId, which can be polled using dlazy status <generateId> --wait; --timeout defaults to waiting 1800 seconds.
  5. Pipeline Parameters: Each flag supports referencing upstream outputs such as -, @N, @stdin (see dlazy --help for details).
  6. Trigger Words: English triggers include doubao tts, text to speech, generate speech, voice broadcast; Chinese triggers include 「豆包 tts」, 「文本转语音」, 「生成语音」, 「语音播报」.

The runtime environment requires npm and npx to be available on the local machine (as declared in the skill metadata).

Installation and Activation

1. Install SkillHub CLI (if not already installed)

Check or install according to the SkillHub Installation Instructions:

command -v skillhub && skillhub --version

If not installed, you can execute the full installation script (the recommended method in the documentation):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install the skill into the current Agent’s skills directory

When installing, you must use --dir to point to the skills path recognized by your current client; otherwise, if it defaults to ./skills/, it may not be loaded. The installation prompt provided on the official page is: Install @user_f95f21b8/dlazy-doubao-tts according to https://skillhub.cn/install/skillhub.md.

Example (replace <skills directory> with your environment path):

skillhub install dlazy-doubao-tts --namespace user_f95f21b8 --dir <skills directory>

Common paths recorded in SkillHub documentation include:

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project directory

After installing or updating the skill, restart or refresh according to your client’s requirements to load the new skill.

3. Install and configure dLazy CLI

Global installation (matching the version pinned in the skill metadata):

npm install -g @dlazy/cli@1.0.9

Or, without installing a global package, invoke on-demand:

npx @dlazy/cli@1.0.9 <command>

Configure the API Key (written to ~/.dlazy/config.json on Linux/macOS; can also use the environment variable DLAZY_API_KEY):

dlazy auth set YOUR_API_KEY

Keys are created at dlazy.com/dashboard/organization/api-key; CLI source code is at github.com/dlazyai/cli.

Typical Usage

The core instruction for the Agent side is to execute dlazy doubao-tts; parameters should follow -h:

dlazy doubao-tts -h

Basic synthesis example (consistent with skill documentation):

dlazy doubao-tts --prompt 'Content of the prompt'

Example with language, voice, and speed (field names derived from help info):

dlazy doubao-tts \
  --prompt 'Hello, this is a test broadcast.' \
  --voice_language zh-cn \
  --voiceId zh_female_shuangkuaisisi_uranus_bigtts \
  --speed_ratio 1.0

On success, the CLI returns JSON where result.tool is doubao-tts, and outputs contains the media URL hosted on files.dlazy.com. You can use --dry-run before calling to check the payload and cost estimate.

Applicable Scenarios and Notes

Who is it for: Teams or individuals who need to quickly convert text into playable audio within Agent conversations; suitable for those who accept using Doubao TTS via the dLazy cloud service rather than building their own Volcano Engine integration.

Limitations and Notes:

  1. Payment and Balance: Requests go through the dLazy API; if the balance is insufficient, it may return code: "insufficient_balance". You need to top up at dlazy.com Credit Settings.
  2. Authentication: Unconfigured or invalid Keys will result in unauthorized; --prompt is a required field.
  3. Data Path: Text and parameters are sent to api.dlazy.com; if local media paths are involved, the CLI will upload them to files.dlazy.com. Before use, please review the dlazy.com Terms of Service and compliance requirements.
  4. Community Skill: This item on SkillHub is published by the community, while the underlying CLI is maintained by dlazyai; you may review the npm package and GitHub source code according to your preferences before installation.

SkillHub Statistics (from captured data): Rating 100000, approximately 1165 downloads; the page also shows an installation count of 2, subject to real-time SkillHub data.

Conclusion

doubao tts consolidates Doubao TTS into an Agent-readable SKILL and a single CLI command, making it suitable for voice broadcasting prototypes in environments like Cursor and Claude Code. Skill and installation entry points:

  • API Page: https://api.skillhub.cn/user_f95f21b8/dlazy-doubao-tts
  • SkillHub Page: https://www.skillhub.cn/skills/user_f95f21b8/dlazy-doubao-tts
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye