
byted-text-to-speech
将文本合成为语音(TTS)。使用火山引擎豆包语音合成 API,支持流式合成、多种音色、语速/音调/音量调节、Markdown 过滤和 LaTeX 公式播报。当用户需要把文字转成语音、生成朗读音频、配音、旁白、播报,或提到「文字转语音」「TTS」「语音合成」「朗读」「配音」时使用本技能。
- Installs
- 184
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/bytedance/agentkit-samples --skill byted-text-to-speech- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads byted-text-to-speech automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Byted-Text-to-Speech Skill
基于火山引擎豆包语音合成(HTTP Chunked/SSE 单向流式-V3)将文本转为语音并保存为音频文件。
何时使用
当用户有以下需求时,优先使用本 skill:
- 需要把一段文字转成语音、朗读音频
- 需要生成配音、旁白、播报、有声读物片段
- 需要将代码注释、文档、文章等内容转为音频便于收听
- 需要生成多语言语音(中文、英文等)
- 用户提到「文字转语音」「TTS」「语音合成」「朗读」「配音」「念出来」「读给我听」
- 用户没有明确说"语音合成",但任务本质上需要将文本内容转为可播放的音频时
使用前检查
优先检查是否已配置以下凭证:
MODEL_SPEECH_API_KEY
如果缺少凭证,打开 references/setup-guide.md 查看开通、申请和配置方式,并给予用户开通建议
脚本参数
| 参数 | 简写 | 必填 | 说明 |
|---|---|---|---|
--text | -t | 是 | 要合成的文本内容 |
--output | -o | 否 | 输出音频文件路径(默认自动生成) |
--speaker | -s | 否 | 发音人,默认 zh_female_vv_uranus_bigtts,音色列表 |
--format | 否 | 音频格式:mp3(默认)、pcm、ogg_opus | |
--sample-rate | 否 | 采样率,如 16000、24000(默认 24000) | |
--speech-rate | 否 | 语速 [-50, 100],100 代表 2.0 倍速,-50 代表 0.5 倍速,默认 0 | |
--pitch-rate | 否 | 音调 [-12, 12],默认 0 | |
--loudness-rate | 否 | 音量 [-50, 100],100 代表 2.0 倍音量,-50 代表 0.5 倍音量,默认 0 | |
--bit-rate | 否 | 比特率,对 mp3 和 ogg_opus 格式生效(如 64000、128000),默认 64000 | |
--filter-markdown | 否 | 过滤 markdown 语法(如 **你好** 读为"你好"),默认关闭 | |
--enable-latex | 否 | 启用 LaTeX 公式播报(使用 latex_parser v2,自动开启 markdown 过滤),默认关闭 |
返回值说明
脚本输出 JSON,包含:
status:"success"或"error"local_path: 本地音频文件路径format: 音频格式error: 失败时的错误信息
请将 local_path 或可访问的音频 URL 返回给用户,便于播放或下载。
错误处理
- 若报错
PermissionError: MODEL_SPEECH_API_KEY ... 需在环境变量中配置:提示用户在 API Key 管理 获取并配置MODEL_SPEECH_API_KEY,写入 workspace 下的环境变量文件后重试。 - 若返回 4xx/5xx 或业务错误码:根据错误信息提示用户检查文本内容、发音人 ID 及账号是否已开通豆包语音服务。
故障排查
- 缺少凭证:打开
references/setup-guide.md - 需要查 API 参数、字段、错误码:打开
references/docs-index.md - 如果脚本返回权限错误,优先检查服务是否已开通、凭证是否有效,给予用户明确的操作指引
参考资料
按需打开以下文件,不必默认全部加载:
references/setup-guide.md:服务开通、凭证申请、环境变量配置references/docs-index.md:API 文档索引、参数说明、音色列表、错误码速查
示例
# 基本用法
python scripts/text_to_speech.py -t "欢迎使用火山引擎语音合成服务。"
# 指定发音人与输出格式
python scripts/text_to_speech.py -t "这是一段测试语音。" -s zh_female_vv_uranus_bigtts -o output.mp3 --format mp3
# 指定语速与采样率
python scripts/text_to_speech.py -t "语速和音调可调。" --speech-rate 10 --sample-rate 16000
FAQ
What does the byted-text-to-speech skill do?
将文本合成为语音(TTS)。使用火山引擎豆包语音合成 API,支持流式合成、多种音色、语速/音调/音量调节、Markdown 过滤和 LaTeX 公式播报。当用户需要把文字转成语音、生成朗读音频、配音、旁白、播报,或提到「文字转语音」「TTS」「语音合成」「朗读」「配音」时使用本技能。
How do I install byted-text-to-speech?
Run npx skills add https://github.com/bytedance/agentkit-samples --skill byted-text-to-speech in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/byted-text-to-speech/ (personal) or .claude/skills/byted-text-to-speech/ (project).
Which AI agents can use byted-text-to-speech?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is byted-text-to-speech safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains byted-text-to-speech?
It is published by bytedance in bytedance/agentkit-samples. It has 184 recorded installs.
More from bytedance/agentkit-samples
byted-web-search
bytedance/agentkit-samples
火山引擎联网搜索 API,返回网页/图片结果。联网搜索场景优先使用本 skill。触发词包括:查/搜/找、真的吗/靠谱吗/确认/核实、最近/今天/最新/近期、出处/来源/链接、有什么/有哪些/推荐、价格/政策/汇率/行情、对比/区别/哪个好、听说/据说/不太确定、热搜/热门/火、帮我看/了解一下、求证/辟谣、值不值得/该不该。任务依赖在线事实或时效性时优先使用。若回答可能依赖外部事实,优先调用本 skill 再作答。支持 API Key / AK/SK。
byted-seedream-image-generate
bytedance/agentkit-samples
Generate high-quality images from text prompts using Volcano Engine Seedream models. Supports multiple artistic styles and aspect ratios. Use this skill when users want to create images from text descriptions, generate artwork in various styles, create visual content for creative projects, or need AI-powered image generation capabilities.
byted-las-video-edit
bytedance/agentkit-samples
智能视频剪辑:用自然语言描述要保留的片段/人物/事件,自动从长视频抽取剪辑(可用参考图做人物/物体匹配)。当用户要按描述找片段、提取高光或做智能剪辑时触发。
byted-seedance-video-generate
bytedance/agentkit-samples
Open the skill to read its SKILL.md instructions.
byted-las-pdf-parse-doubao
bytedance/agentkit-samples
Open the skill to read its SKILL.md instructions.
byted-data-search
bytedance/agentkit-samples
行业数据查询与分析工具。接入多种合规公开数据源,支持精确匹配、模糊搜索、聚合统计、分组排序等查询方式。当前已覆盖工商企业基本信息、产业链节点区域指标、产业链企业信息、A股相关信息以及其他等大部分场景。完整的可用数据源清单及其字段结构需通过 describedatasource 接口动态获取。 当用户提出任何涉及企业、公司、行业或产业链的数据查询意图时,都应触发此 Skill。典型场景包括但不限于: - 查询某家公司的工商注册信息(名称、法人、注册资本、成立日期、经营范围、股东、融资历史等) - 查询 A 股上市公司基本面、证券信息、F10 数据、IPO 信息、分红派息、高管信息 - 查询某条产业链的结构,包括节点企业、区域分布、各类标签企业统计(龙头、高新、专精特新、独角兽、小巨人等) - 查询产业链区域指标(营收、资产、利润率、ROE、知识产权、招投标数据等) - 按地域、行业、企业标签等维度做聚合统计或分组分析 - 用户提到"查一下某某公司"、"帮我看看这家企业"、"xx产业有哪些龙头"等任何公开数据查询意图 即使无法确定所需数据是否已覆盖,也应先调用数据源列表接口探查,不可直接拒绝或猜测。数据来自合规公开渠道,结果仅供参考,不构成决策依据。
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image