slides
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen to Use
适用场景
- User wants to create a slide deck or presentation
- User asks for "slides", "幻灯片", "PPT", or "presentation"
- User wants visual content organized into slides from a topic or URL
- 用户想要创建幻灯片或演示文稿
- 用户提到"slides"、"幻灯片"、"PPT"或者"presentation"
- 用户想要将主题或URL对应的内容整理成可视化的幻灯片形式
When NOT to Use
不适用场景
- User wants a narrated video without slides (use )
/explainer - User wants audio-only content (use or
/speech)/podcast - User wants a podcast-style discussion (use )
/podcast - User wants to generate a standalone image (use )
/image-gen
- 用户想要不带幻灯片的解说视频(使用)
/explainer - 用户想要纯音频内容(使用或
/speech)/podcast - 用户想要播客风格的讨论内容(使用)
/podcast - 用户想要生成独立图片(使用)
/image-gen
Purpose
用途
Generate slide decks with AI-generated visuals from topics, URLs, or text. By default, slides are generated without audio narration. Narration can be optionally enabled. Ideal for presentations, summaries, and visual storytelling.
根据主题、URL或文本生成带有AI生成视觉内容的幻灯片。默认生成的幻灯片不带语音旁白,可选择启用旁白功能。适合用于演示、内容总结和可视化叙事。
Hard Constraints
硬性约束
- Always read config following before any interaction
shared/config-pattern.md - Follow for execution modes, error handling, and interaction patterns
shared/cli-patterns.md - Always follow for auth checks
shared/cli-authentication.md - Follow when narration is enabled
shared/speaker-selection.md - Never hardcode speaker IDs — always fetch from the speakers CLI when the user wants to change voice
- Never save files to or
~/Downloads/— save artifacts to the current working directory with friendly topic-based names (see.listenhub/§ Artifact Naming)shared/config-pattern.md - Mode is always — never
slidesorinfo(those are forstory)/explainer - Only 1 speaker supported (when narration is enabled)
- Default behavior: skip audio (no narration). Only add narration when the user explicitly requests it via
--no-skip-audio
- 任何交互前必须先阅读中的配置规则
shared/config-pattern.md - 执行模式、错误处理和交互逻辑遵循规范
shared/cli-patterns.md - 身份校验必须严格遵循规则
shared/cli-authentication.md - 启用旁白功能时遵循规则选主播
shared/speaker-selection.md - 禁止硬编码主播ID,用户要修改声音时必须从speakers CLI获取
- 禁止将文件保存到或
~/Downloads/目录,生成的文件要以主题相关的友好名称保存到当前工作目录(参考.listenhub/§ 文件命名规则)shared/config-pattern.md - 模式固定为,禁止使用
slides或info模式(这两个模式属于story功能)/explainer - 启用旁白时仅支持1位主播
- 默认行为:跳过音频生成(无旁白),仅当用户通过明确要求时才添加旁白
--no-skip-audio
Step -1: CLI Auth Check
步骤-1:CLI身份校验
Follow . If the CLI is not installed or the user is not logged in, auto-install and auto-login — never ask the user to run commands manually.
shared/cli-authentication.md遵循规则。如果CLI未安装或用户未登录,自动完成安装和登录流程,不要让用户手动执行命令。
shared/cli-authentication.mdStep 0: Config Setup
步骤0:配置初始化
Follow Step 0 (Zero-Question Boot).
shared/config-pattern.mdIf file doesn't exist — silently create with defaults and proceed:
bash
mkdir -p ".listenhub/slides"
echo '{"outputMode":"inline","language":null,"defaultSpeakers":{}}' > ".listenhub/slides/config.json"
CONFIG_PATH=".listenhub/slides/config.json"
CONFIG=$(cat "$CONFIG_PATH")Do NOT ask any setup questions. Proceed directly to the Interaction Flow.
If file exists — read config silently and proceed:
bash
CONFIG_PATH=".listenhub/slides/config.json"
[ ! -f "$CONFIG_PATH" ] && CONFIG_PATH="$HOME/.listenhub/slides/config.json"
CONFIG=$(cat "$CONFIG_PATH")遵循步骤0(零询问启动)规则。
shared/config-pattern.md如果配置文件不存在——静默创建默认配置并继续:
bash
mkdir -p ".listenhub/slides"
echo '{"outputMode":"inline","language":null,"defaultSpeakers":{}}' > ".listenhub/slides/config.json"
CONFIG_PATH=".listenhub/slides/config.json"
CONFIG=$(cat "$CONFIG_PATH")不要询问任何配置相关问题,直接进入交互流程。
如果配置文件已存在——静默读取配置并继续:
bash
CONFIG_PATH=".listenhub/slides/config.json"
[ ! -f "$CONFIG_PATH" ] && CONFIG_PATH="$HOME/.listenhub/slides/config.json"
CONFIG=$(cat "$CONFIG_PATH")Setup Flow (user-initiated reconfigure only)
配置流程(仅用户主动要求重新配置时执行)
Only run when the user explicitly asks to reconfigure. Display current settings:
当前配置 (slides):
输出方式:{inline / download / both}
语言偏好:{zh / en / 未设置}
默认主播:{speakerName / 使用内置默认}Then ask:
-
outputMode: Follow§ Setup Flow Question.
shared/output-mode.md -
Language (optional): "默认语言?"
- "中文 (zh)"
- "English (en)"
- "每次手动选择" → keep
null
After collecting answers, save immediately:
bash
NEW_CONFIG=$(echo "$CONFIG" | jq --arg m "$OUTPUT_MODE" '. + {"outputMode": $m}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"
CONFIG=$(cat "$CONFIG_PATH")仅当用户明确要求重新配置时运行。先展示当前设置:
当前配置 (slides):
输出方式:{inline / download / both}
语言偏好:{zh / en / 未设置}
默认主播:{speakerName / 使用内置默认}然后依次询问:
-
outputMode: 遵循§ 配置流程问题规则。
shared/output-mode.md -
语言(可选):"默认语言?"
- "中文 (zh)"
- "English (en)"
- "每次手动选择" → 保留值
null
收集完答案后立即保存:
bash
NEW_CONFIG=$(echo "$CONFIG" | jq --arg m "$OUTPUT_MODE" '. + {"outputMode": $m}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"
CONFIG=$(cat "$CONFIG_PATH")Interaction Flow
交互流程
Step 1: Topic / Content
步骤1:主题/内容
Free text input. Ask the user:
What would you like to create slides about?
Accept: topic description, text content, URL(s), or any combination.
支持自由文本输入,询问用户:
您想要制作关于什么主题的幻灯片?
支持输入:主题描述、文本内容、URL,或以上任意组合。
Step 2: Language
步骤2:语言选择
If is set, pre-fill and show in summary — skip this question.
Otherwise ask:
config.languageQuestion: "What language?"
Options:
- "Chinese (zh)" — Content in Mandarin Chinese
- "English (en)" — Content in English
- "Japanese (ja)" — Content in Japanese如果已设置,直接使用该值并在确认汇总中展示,跳过该问题。否则询问:
config.language问题:"选择什么语言?"
选项:
- "中文 (zh)" — 内容使用中文
- "English (en)" — 内容使用英文
- "Japanese (ja)" — 内容使用日文Step 3: Narration
步骤3:旁白选择
Ask:
Question: "需要语音旁白吗?(默认否)"
Options:
- "不需要" — Slides only, no narration
- "需要" — Add voice narration to slidesDefault is no narration. If the user says yes, proceed to Step 4. Otherwise skip to Step 5.
询问:
问题:"需要语音旁白吗?(默认否)"
选项:
- "不需要" — 仅生成幻灯片,无旁白
- "需要" — 为幻灯片添加语音旁白默认无旁白。如果用户选择需要,进入步骤4,否则直接跳转到步骤5。
Step 4: Speaker Selection (only if narration enabled)
步骤4:主播选择(仅启用旁白时执行)
Skip this step entirely if narration is not enabled.
Follow :
shared/speaker-selection.md- If is set → use saved speaker silently
config.defaultSpeakers.{language} - If not set → use built-in default from for the language
shared/speaker-selection.md - Show the speaker in the confirmation summary (Step 5) — user can change from there if desired
- Only show the full speaker list if the user explicitly asks to change voice
Only 1 speaker is supported for slides narration.
未启用旁白时完全跳过该步骤。
遵循规则:
shared/speaker-selection.md- 如果已设置 → 静默使用保存的主播
config.defaultSpeakers.{language} - 如果未设置 → 使用中对应语言的内置默认主播
shared/speaker-selection.md - 在确认汇总(步骤5)中展示使用的主播——用户如果想要修改可以在该环节提出
- 仅当用户明确要求更换声音时才展示完整的主播列表
幻灯片旁白仅支持1位主播。
Step 5: Confirm & Generate
步骤5:确认与生成
Summarize all choices:
Without narration:
Ready to generate slides:
Topic: {topic}
Language: {language}
Narration: No
Proceed?With narration:
Ready to generate slides:
Topic: {topic}
Language: {language}
Narration: Yes
Speaker: {speaker name}
Proceed?Wait for explicit confirmation before running any CLI command.
汇总所有用户选择:
无旁白场景:
准备生成幻灯片:
主题:{topic}
语言:{language}
旁白:无
是否继续?有旁白场景:
准备生成幻灯片:
主题:{topic}
语言:{language}
旁白:有
主播:{speaker name}
是否继续?执行任何CLI命令前必须等待用户明确确认。
Workflow
工作流
-
Submit (background): Run the CLI command withand
run_in_background: true:timeout: 660000Without narration (default):bashlistenhub slides create \ --query "{topic}" \ --lang {en|zh|ja} \ --image-size 2K \ --aspect-ratio 16:9 \ --timeout 600 \ --jsonWith narration:bashlistenhub slides create \ --query "{topic}" \ --lang {en|zh|ja} \ --image-size 2K \ --aspect-ratio 16:9 \ --no-skip-audio \ --speaker "{name}" \ --timeout 600 \ --jsonIf the user provided a source URL, add.--source-url "{url}"The CLI handles polling internally and returns the final result when generation completes. -
Tell the user the task is submitted and that they will be notified when it finishes.
-
When notified of completion, parse and present the result:Parse the CLI JSON output for key fields:bash
EPISODE_ID=$(echo "$RESULT" | jq -r '.episodeId') AUDIO_URL=$(echo "$RESULT" | jq -r '.audioUrl // empty') CREDITS=$(echo "$RESULT" | jq -r '.credits // empty')Readfrom config. FollowOUTPUT_MODEfor behavior.shared/output-mode.mdWithout narration:orinline: Present the online link.both幻灯片已生成! 在线查看:https://listenhub.ai/app/slides/{episodeId} 消耗积分:{credits}ordownload: Also save the script file. Generate a topic slug followingboth§ Artifact Naming.shared/config-pattern.md- Save as in cwd (dedup if exists)
{slug}-slides.md - Present the save path in addition to the above summary.
With narration:orinline: Display audio URL as a clickable link.both幻灯片已生成! 在线查看:https://listenhub.ai/app/slides/{episodeId} 音频链接:{audioUrl} 消耗积分:{credits}ordownload: Also save files. Generate a topic slug followingboth§ Artifact Naming.shared/config-pattern.md- Create folder (dedup if exists)
{slug}-slides/ - Write inside
script.md - Download audio:
bash
curl -sS -o "{slug}-slides/audio.mp3" "{audioUrl}" - Present:
已保存到当前目录: {slug}-slides/ script.md audio.mp3
- Save as
-
提交任务(后台运行):运行CLI命令,设置和
run_in_background: true:timeout: 660000无旁白(默认):bashlistenhub slides create \ --query "{topic}" \ --lang {en|zh|ja} \ --image-size 2K \ --aspect-ratio 16:9 \ --timeout 600 \ --json有旁白:bashlistenhub slides create \ --query "{topic}" \ --lang {en|zh|ja} \ --image-size 2K \ --aspect-ratio 16:9 \ --no-skip-audio \ --speaker "{name}" \ --timeout 600 \ --json如果用户提供了来源URL,添加参数。--source-url "{url}"CLI内部会自动轮询状态,生成完成后返回最终结果。 -
告知用户任务已提交,生成完成后会通知用户。
-
收到完成通知后,解析并展示结果:解析CLI返回的JSON输出的关键字段:bash
EPISODE_ID=$(echo "$RESULT" | jq -r '.episodeId') AUDIO_URL=$(echo "$RESULT" | jq -r '.audioUrl // empty') CREDITS=$(echo "$RESULT" | jq -r '.credits // empty')从配置中读取,遵循OUTPUT_MODE规则处理。shared/output-mode.md无旁白场景:或inline模式:展示在线访问链接。both幻灯片已生成! 在线查看:https://listenhub.ai/app/slides/{episodeId} 消耗积分:{credits}或download模式:同时保存脚本文件。按照both§ 文件命名规则生成主题slug。shared/config-pattern.md- 在当前工作目录保存为(如果文件已存在自动去重)
{slug}-slides.md - 在上述汇总信息基础上额外展示保存路径。
有旁白场景:或inline模式:将音频链接展示为可点击链接。both幻灯片已生成! 在线查看:https://listenhub.ai/app/slides/{episodeId} 音频链接:{audioUrl} 消耗积分:{credits}或download模式:同时保存文件。按照both§ 文件命名规则生成主题slug。shared/config-pattern.md- 创建文件夹(如果文件夹已存在自动去重)
{slug}-slides/ - 在文件夹内写入
script.md - 下载音频:
bash
curl -sS -o "{slug}-slides/audio.mp3" "{audioUrl}" - 展示:
已保存到当前目录: {slug}-slides/ script.md audio.mp3
- 在当前工作目录保存为
After Successful Generation
生成成功后操作
Update config with the choices made this session:
bash
NEW_CONFIG=$(echo "$CONFIG" | jq \
--arg lang "{language}" \
'. + {"language": $lang}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"If narration was used, also save the speaker:
bash
NEW_CONFIG=$(echo "$CONFIG" | jq \
--arg lang "{language}" \
--arg speakerId "{speakerId}" \
'. + {"language": $lang, "defaultSpeakers": (.defaultSpeakers + {($lang): [$speakerId]})}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"Estimated times:
- Slides without narration: 2-4 minutes
- Slides with narration: 4-8 minutes
使用本次会话的选择更新配置:
bash
NEW_CONFIG=$(echo "$CONFIG" | jq \
--arg lang "{language}" \
'. + {"language": $lang}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"如果使用了旁白,同时保存主播信息:
bash
NEW_CONFIG=$(echo "$CONFIG" | jq \
--arg lang "{language}" \
--arg speakerId "{speakerId}" \
'. + {"language": $lang, "defaultSpeakers": (.defaultSpeakers + {($lang): [$speakerId]})}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"预计生成时长:
- 无旁白幻灯片:2-4分钟
- 带旁白幻灯片:4-8分钟
Resources
参考资源
- CLI authentication:
shared/cli-authentication.md - CLI patterns:
shared/cli-patterns.md - Speaker query:
shared/cli-speakers.md - Speaker selection guide:
shared/speaker-selection.md - Config pattern:
shared/config-pattern.md - Output mode:
shared/output-mode.md
- CLI身份校验:
shared/cli-authentication.md - CLI规范:
shared/cli-patterns.md - 主播查询:
shared/cli-speakers.md - 主播选择指南:
shared/speaker-selection.md - 配置规范:
shared/config-pattern.md - 输出模式:
shared/output-mode.md
Composability
可组合性
- Invokes: speakers CLI (for speaker selection when narration enabled)
- Invoked by: content-planner (Phase 3)
- 调用:speakers CLI(启用旁白时用于选择主播)
- 被调用方:content-planner(第三阶段)
Example
示例
User: "帮我做一个关于量子计算的幻灯片"
Agent workflow:
- Topic: "量子计算"
- Language: pre-filled from config or ask → "zh"
- Narration: ask → "不需要"
- Confirm and generate
bash
listenhub slides create \
--query "量子计算" \
--lang zh \
--image-size 2K \
--aspect-ratio 16:9 \
--timeout 600 \
--jsonWait for CLI to return result, then present the online link.
User: "Create slides about React hooks with narration"
Agent workflow:
- Topic: "React hooks"
- Language: ask → "en"
- Narration: ask → "需要"
- Speaker: use built-in default for English
- Confirm and generate
bash
listenhub slides create \
--query "React hooks" \
--lang en \
--image-size 2K \
--aspect-ratio 16:9 \
--no-skip-audio \
--speaker "Mars" \
--timeout 600 \
--jsonWait for CLI to return result, then present the online link and audio link.
用户:"帮我做一个关于量子计算的幻灯片"
Agent工作流:
- 主题:"量子计算"
- 语言:从配置预填充或询问 → "zh"
- 旁白:询问 → "不需要"
- 确认后生成
bash
listenhub slides create \
--query "量子计算" \
--lang zh \
--image-size 2K \
--aspect-ratio 16:9 \
--timeout 600 \
--json等待CLI返回结果,然后展示在线访问链接。
用户:"Create slides about React hooks with narration"
Agent工作流:
- 主题:"React hooks"
- 语言:询问 → "en"
- 旁白:询问 → "需要"
- 主播:使用英文内置默认主播
- 确认后生成
bash
listenhub slides create \
--query "React hooks" \
--lang en \
--image-size 2K \
--aspect-ratio 16:9 \
--no-skip-audio \
--speaker "Mars" \
--timeout 600 \
--json等待CLI返回结果,然后展示在线访问链接和音频链接。