slides

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When 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
    /speech
    or
    /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
    shared/config-pattern.md
    before any interaction
  • Follow
    shared/cli-patterns.md
    for execution modes, error handling, and interaction patterns
  • Always follow
    shared/cli-authentication.md
    for auth checks
  • Follow
    shared/speaker-selection.md
    when narration is enabled
  • Never hardcode speaker IDs — always fetch from the speakers CLI when the user wants to change voice
  • Never save files to
    ~/Downloads/
    or
    .listenhub/
    — save artifacts to the current working directory with friendly topic-based names (see
    shared/config-pattern.md
    § Artifact Naming)
  • Mode is always
    slides
    — never
    info
    or
    story
    (those are for
    /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
<HARD-GATE> Use the AskUserQuestion tool for every multiple-choice step — do NOT print options as plain text. Ask one question at a time. Wait for the user's answer before proceeding to the next step. After all parameters are collected, summarize the choices and ask the user to confirm. Do NOT call any CLI command until the user has explicitly confirmed. </HARD-GATE>
  • 任何交互前必须先阅读
    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
    明确要求时才添加旁白
<HARD-GATE> 每个多选项步骤都要使用AskUserQuestion工具,不要以纯文本形式输出选项。每次仅提出一个问题,等待用户回复后再进入下一步。收集完所有参数后,汇总用户的选择并请求确认。在用户明确确认前,请勿调用任何CLI命令。 </HARD-GATE>

Step -1: CLI Auth Check

步骤-1:CLI身份校验

Follow
shared/cli-authentication.md
. 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未安装或用户未登录,自动完成安装和登录流程,不要让用户手动执行命令。

Step 0: Config Setup

步骤0:配置初始化

Follow
shared/config-pattern.md
Step 0 (Zero-Question Boot).
If 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")
遵循
shared/config-pattern.md
步骤0(零询问启动)规则。
如果配置文件不存在——静默创建默认配置并继续:
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:
  1. outputMode: Follow
    shared/output-mode.md
    § Setup Flow Question.
  2. 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 / 使用内置默认}
然后依次询问:
  1. outputMode: 遵循
    shared/output-mode.md
    § 配置流程问题规则。
  2. 语言(可选):"默认语言?"
    • "中文 (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
config.language
is set, pre-fill and show in summary — skip this question. Otherwise ask:
Question: "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 slides
Default 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
    config.defaultSpeakers.{language}
    is set → use saved speaker silently
  • If not set → use built-in default from
    shared/speaker-selection.md
    for the language
  • 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

工作流

  1. Submit (background): Run the CLI command with
    run_in_background: true
    and
    timeout: 660000
    :
    Without narration (default):
    bash
    listenhub slides create \
      --query "{topic}" \
      --lang {en|zh|ja} \
      --image-size 2K \
      --aspect-ratio 16:9 \
      --timeout 600 \
      --json
    With narration:
    bash
    listenhub slides create \
      --query "{topic}" \
      --lang {en|zh|ja} \
      --image-size 2K \
      --aspect-ratio 16:9 \
      --no-skip-audio \
      --speaker "{name}" \
      --timeout 600 \
      --json
    If the user provided a source URL, add
    --source-url "{url}"
    .
    The CLI handles polling internally and returns the final result when generation completes.
  2. Tell the user the task is submitted and that they will be notified when it finishes.
  3. 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')
    Read
    OUTPUT_MODE
    from config. Follow
    shared/output-mode.md
    for behavior.
    Without narration:
    inline
    or
    both
    : Present the online link.
    幻灯片已生成!
    
    在线查看:https://listenhub.ai/app/slides/{episodeId}
    消耗积分:{credits}
    download
    or
    both
    : Also save the script file. Generate a topic slug following
    shared/config-pattern.md
    § Artifact Naming.
    • Save as
      {slug}-slides.md
      in cwd (dedup if exists)
    • Present the save path in addition to the above summary.
    With narration:
    inline
    or
    both
    : Display audio URL as a clickable link.
    幻灯片已生成!
    
    在线查看:https://listenhub.ai/app/slides/{episodeId}
    音频链接:{audioUrl}
    消耗积分:{credits}
    download
    or
    both
    : Also save files. Generate a topic slug following
    shared/config-pattern.md
    § Artifact Naming.
    • Create
      {slug}-slides/
      folder (dedup if exists)
    • Write
      script.md
      inside
    • Download audio:
      bash
      curl -sS -o "{slug}-slides/audio.mp3" "{audioUrl}"
    • Present:
      已保存到当前目录:
        {slug}-slides/
          script.md
          audio.mp3
  1. 提交任务(后台运行):运行CLI命令,设置
    run_in_background: true
    timeout: 660000
    无旁白(默认):
    bash
    listenhub slides create \
      --query "{topic}" \
      --lang {en|zh|ja} \
      --image-size 2K \
      --aspect-ratio 16:9 \
      --timeout 600 \
      --json
    有旁白:
    bash
    listenhub 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内部会自动轮询状态,生成完成后返回最终结果。
  2. 告知用户任务已提交,生成完成后会通知用户。
  3. 收到完成通知后,解析并展示结果
    解析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
    模式
    :同时保存脚本文件。按照
    shared/config-pattern.md
    § 文件命名规则生成主题slug。
    • 在当前工作目录保存为
      {slug}-slides.md
      (如果文件已存在自动去重)
    • 在上述汇总信息基础上额外展示保存路径。
    有旁白场景:
    inline
    both
    模式
    :将音频链接展示为可点击链接。
    幻灯片已生成!
    
    在线查看:https://listenhub.ai/app/slides/{episodeId}
    音频链接:{audioUrl}
    消耗积分:{credits}
    download
    both
    模式
    :同时保存文件。按照
    shared/config-pattern.md
    § 文件命名规则生成主题slug。
    • 创建
      {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:
  1. Topic: "量子计算"
  2. Language: pre-filled from config or ask → "zh"
  3. Narration: ask → "不需要"
  4. Confirm and generate
bash
listenhub slides create \
  --query "量子计算" \
  --lang zh \
  --image-size 2K \
  --aspect-ratio 16:9 \
  --timeout 600 \
  --json
Wait for CLI to return result, then present the online link.
User: "Create slides about React hooks with narration"
Agent workflow:
  1. Topic: "React hooks"
  2. Language: ask → "en"
  3. Narration: ask → "需要"
  4. Speaker: use built-in default for English
  5. 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 \
  --json
Wait for CLI to return result, then present the online link and audio link.
用户:"帮我做一个关于量子计算的幻灯片"
Agent工作流
  1. 主题:"量子计算"
  2. 语言:从配置预填充或询问 → "zh"
  3. 旁白:询问 → "不需要"
  4. 确认后生成
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工作流
  1. 主题:"React hooks"
  2. 语言:询问 → "en"
  3. 旁白:询问 → "需要"
  4. 主播:使用英文内置默认主播
  5. 确认后生成
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返回结果,然后展示在线访问链接和音频链接。