/goal-workflow-skills:listenhub-ttsfrom goal-workflow-skills
Converts text to speech via ListenHub API with three modes: fast synthesis for short text, multi-role script for dialogues, and streaming for long text. Supports voice selection and defaults to chat-girl-105-cn.
Ships in goal-workflow-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
使用 ListenHub OpenAPI 将文本转换为语音。支持三种合成模式,覆盖从短文本到长文本的全场景。
https://api.marswave.ai/openapiAuthorization: Bearer $LISTENHUB_API_KEY(从环境变量读取)LISTENHUB_API_KEY 环境变量已设置,未设置则提示用户配置直接使用用户指定的 speakerId,跳过选择流程。
GET /v1/speakers/list?language=zh 获取可用音色列表chat-girl-105-cn(晓曼 dxqqq){name}({gender},{speakerId})| 字段 | 值 |
|---|---|
| speakerId | chat-girl-105-cn |
| 名称 | 晓曼 dxqqq |
适用场景: 短文本(< 1000 字),单音色,需要低延迟
接口: POST /v1/tts
请求体:
{
"text": "要合成的文本",
"speakerId": "chat-girl-105-cn",
"format": "mp3",
"sampleRate": 24000,
"speed": 1.0
}
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| text | string | 是 | 要合成的文本 |
| speakerId | string | 是 | 音色 ID |
| format | string | 否 | 输出格式,默认 mp3 |
| sampleRate | int | 否 | 采样率,默认 24000 |
| speed | float | 否 | 语速,默认 1.0,范围 0.5 ~ 2.0 |
响应: 直接返回 MP3 二进制流(Content-Type: audio/mpeg)
调用示例:
curl -X POST "https://api.marswave.ai/openapi/v1/tts" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "你好世界", "speakerId": "chat-girl-105-cn"}' \
-o output.mp3
适用场景: 多角色对话、播客、有声书片段,需要不同音色交替朗读
接口: POST /v1/speech
请求体:
{
"script": [
{
"text": "你好,欢迎收听本期节目。",
"speakerId": "chat-girl-105-cn"
},
{
"text": "谢谢,今天我们来聊聊 AI。",
"speakerId": "chat-boy-101-cn"
}
],
"format": "mp3",
"sampleRate": 24000
}
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| script | array | 是 | 脚本数组,每项包含 text 和 speakerId |
| script[].text | string | 是 | 该段文本 |
| script[].speakerId | string | 是 | 该段的音色 ID |
| format | string | 否 | 输出格式,默认 mp3 |
| sampleRate | int | 否 | 采样率,默认 24000 |
响应: JSON
{
"audioUrl": "https://cdn.example.com/output.mp3",
"duration": 12.5
}
调用示例:
curl -X POST "https://api.marswave.ai/openapi/v1/speech" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"script": [
{"text": "你好,欢迎收听。", "speakerId": "chat-girl-105-cn"},
{"text": "谢谢,我们开始吧。", "speakerId": "chat-boy-101-cn"}
]
}'
适用场景: 长文本(> 1000 字),文章朗读,需要 AI 润色或分段处理
接口: POST /v1/flow-speech/episodes
请求体:
{
"title": "文章标题",
"content": "长文本内容...",
"speakerId": "chat-girl-105-cn",
"mode": "direct",
"format": "mp3"
}
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| title | string | 是 | 音频标题 |
| content | string | 否 | 文本内容(与 contentUrl 二选一) |
| contentUrl | string | 否 | 内容 URL(与 content 二选一) |
| speakerId | string | 是 | 音色 ID |
| mode | string | 否 | direct(直接合成)或 aiPolish(AI 润色),默认 direct |
| format | string | 否 | 输出格式,默认 mp3 |
响应: JSON
{
"episodeId": "ep_abc123",
"status": "processing"
}
轮询获取结果:
GET /v1/flow-speech/episodes/{episodeId}
轮询策略:
completed 或 failed轮询响应:
{
"episodeId": "ep_abc123",
"status": "completed",
"audioUrl": "https://cdn.example.com/output.mp3",
"duration": 180.5
}
| status 值 | 说明 |
|---|---|
| processing | 合成中,继续轮询 |
| completed | 合成完成,audioUrl 可用 |
| failed | 合成失败,查看 errorMessage |
调用示例:
# 提交任务
curl -X POST "https://api.marswave.ai/openapi/v1/flow-speech/episodes" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "AI 技术趋势",
"content": "长文本内容...",
"speakerId": "chat-girl-105-cn",
"mode": "direct"
}'
# 轮询结果
curl "https://api.marswave.ai/openapi/v1/flow-speech/episodes/ep_abc123" \
-H "Authorization: Bearer $LISTENHUB_API_KEY"
接口: GET /v1/speakers/list
查询参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| language | string | 否 | 筛选语言,如 zh(中文)、en(英文) |
响应:
{
"speakers": [
{
"name": "晓曼 dxqqq",
"speakerId": "chat-girl-105-cn",
"demoAudioUrl": "https://cdn.example.com/demo.mp3",
"gender": "female",
"language": "zh"
}
]
}
根据用户输入自动选择最合适的模式:
| 条件 | 模式 |
|---|---|
| 文本 ≤ 1000 字,单音色 | 模式一:/v1/tts |
| 多角色脚本,需要不同音色 | 模式二:/v1/speech |
| 文本 > 1000 字,或需要 AI 润色 | 模式三:/v1/flow-speech/episodes |
| 用户提供 URL 作为内容来源 | 模式三:/v1/flow-speech/episodes |
如果用户明确指定模式,优先使用用户指定的模式。
当用户未指定音色时,使用 AskUserQuestion 展示音色列表:
请选择音色(默认:晓曼 dxqqq):
A. 晓曼 dxqqq(女,chat-girl-105-cn)[默认]
B. [其他音色名称]([性别],[speakerId])
C. ...
可选询问:
./output.mp3)./output.mp3)LISTENHUB_API_KEY 环境变量用户输入: "把这段文字转成语音:今天天气真好,适合出去散步。"
执行流程:
LISTENHUB_API_KEY ✓/v1/ttschat-girl-105-cn(晓曼)./output.mp3用户输入: "用晓曼的声音朗读这篇文章:article.md"
执行流程:
article.md 内容/v1/flow-speech/episodeschat-girl-105-cn(晓曼)./article.mp3What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tts, text-to-speech, audio-generation, listenhub, voice-synthesis
npx claudepluginhub smallnest/goal-workflow --plugin goal-workflow-skills22 skills in this plugin
/article-iconsIllustrate an article (Markdown, HTML, etc.) with animated-style icons from itshover.com/icons. Fetches icons as clean inline SVG and places them at section headings, key concepts, lists, and callouts. Triggers on: /article-icons, 配图, 给文章配图标, add icons to article, illustrate with icons./code-to-specReverse-engineer a SPEC document from an existing project. Analyzes code, config, tests, and structure to produce a comprehensive specification. Triggers on: code-to-spec, reverse spec, generate spec, 逆向规格, 生成规格文档, 生成设计文档, 生成设计方案, extract spec, document this project, what does this project do./debug-itDisciplined bug diagnosis, performance regression forensics, and root-cause fixing: build a tight red-capable feedback loop -> minimise -> rank 3-5 falsifiable hypotheses -> instrument -> attack failed premises -> fix root causes -> lock down with regression test and proof. Triggers on: /debug-it, debug this, diagnose bug, root cause, perf regression, 排查 bug, 根因定位, 诊断问题, 性能退化排查./design-itUse when turning a requirement, spec, or feature brief into a single self-contained HTML design document in a fixed house style — one styled HTML page with a table-of-contents, architecture/sequence SVG diagrams, code/SQL/YAML blocks, callout boxes, an aligned-decisions (已对齐结论) panel, test cases, and a code index. Reuse for any new 需求/设计文档 that should look identical every time./graphGraph engineering for parallel task execution: convert a task, PRD, SPEC, or issue set into a dependency graph (DAG), layer it into supersteps, then implement each independent node concurrently with subagents — each node runs /goal → /review-it → /ship-it in an isolated git worktree, with a fan-in barrier between waves. Triggers on: graph, graph engineering, build a graph, task graph, dependency graph, DAG, parallel implement, 并发实现, 并行实现, 任务图, 把任务变成图, fan-out fan-in, superstep, dynamic workflow./humanize-it对指定文档进行去 AI 味的改写。自动选择最合适的人性化策略(humanizer-zh / humanize-chinese / technical-writing), 迭代改写直到效果达标或迭代 42 次为止。适用于中文文本的去 AI 化处理,包括通用文章、技术文档、学术论文等。 Use when user says: "humanize this", "去AI味", "降AIGC", "人性化改写", "改成人话", "去除AI痕迹", "humanize document", "make text human-like", "去机器味", "降低AI率", "过AIGC检测"
Other plugins' skills for the same job