Loading...
Loading...
Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".
npx skill4agent add marswaveai/skills explainer/speech/podcast/podcast/image-gen/speechshared/authentication.mdshared/common-patterns.mdshared/config-pattern.md~/Downloads/.listenhub/explainer/infostoryslides/slidesshared/config-pattern.mdshared/config-pattern.mdmkdir -p ".listenhub/explainer"
echo '{"outputDir":".listenhub","outputMode":"inline","language":null,"defaultStyle":null,"defaultSpeakers":{}}' > ".listenhub/explainer/config.json"
CONFIG_PATH=".listenhub/explainer/config.json"
# (or $HOME/.listenhub/explainer/config.json for global)当前配置 (explainer):
输出方式:{inline / download / both}
语言偏好:{zh / en / 未设置}
默认风格:{info / story / 未设置}
默认主播:{speakerName / 未设置}shared/output-mode.mdnullnull# Follow shared/output-mode.md § Save to Config
NEW_CONFIG=$(echo "$CONFIG" | jq --arg m "$OUTPUT_MODE" '. + {"outputMode": $m}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"
CONFIG=$(cat "$CONFIG_PATH")defaultSpeakersWhat would you like to explain or introduce?
config.languageQuestion: "What language?"
Options:
- "Chinese (zh)" — Content in Mandarin Chinese
- "English (en)" — Content in Englishconfig.defaultStyleQuestion: "What style of explainer?"
Options:
- "Info" — Informational, factual presentation style
- "Story" — Narrative, storytelling approachshared/speaker-selection.mdconfig.defaultSpeakers.{language}Question: "What output do you want?"
Options:
- "Text script only" — Generate narration script, no video
- "Text + Video" — Generate full explainer video with AI visualsReady to generate explainer:
Topic: {topic}
Language: {language}
Style: {info/story}
Speaker: {speaker name}
Output: {text only / text + video}
Proceed?POST /storybook/episodesepisodeIdrun_in_background: truetimeout: 600000jqEPISODE_ID="<id-from-step-1>"
for i in $(seq 1 30); do
RESULT=$(curl -sS "https://api.marswave.ai/openapi/v1/storybook/episodes/$EPISODE_ID" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" 2>/dev/null)
STATUS=$(echo "$RESULT" | tr -d '\000-\037\177' | jq -r '.data.processStatus // "pending"')
case "$STATUS" in
success|completed) echo "$RESULT"; exit 0 ;;
failed|error) echo "FAILED: $RESULT" >&2; exit 1 ;;
*) sleep 10 ;;
esac
done
echo "TIMEOUT" >&2; exit 2OUTPUT_MODEshared/output-mode.mdinlineboth解说脚本已生成!
「{title}」
在线查看:https://listenhub.ai/app/explainer/{episodeId}downloadboth.listenhub/explainer/YYYY-MM-DD-{episodeId}/{episodeId}.mdPOST /storybook/episodes/{episodeId}/videorun_in_background: truetimeout: 600000videoStatusprocessStatusEPISODE_ID="<id-from-step-1>"
for i in $(seq 1 30); do
RESULT=$(curl -sS "https://api.marswave.ai/openapi/v1/storybook/episodes/$EPISODE_ID" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" 2>/dev/null)
STATUS=$(echo "$RESULT" | tr -d '\000-\037\177' | jq -r '.data.videoStatus // "pending"')
case "$STATUS" in
success|completed) echo "$RESULT"; exit 0 ;;
failed|error) echo "FAILED: $RESULT" >&2; exit 1 ;;
*) sleep 10 ;;
esac
done
echo "TIMEOUT" >&2; exit 2OUTPUT_MODEshared/output-mode.mdinlineboth解说视频已生成!
视频链接:{videoUrl}
音频链接:{audioUrl}
时长:{duration}s
消耗积分:{credits}downloadbothDATE=$(date +%Y-%m-%d)
JOB_DIR=".listenhub/explainer/${DATE}-{jobId}"
mkdir -p "$JOB_DIR"
curl -sS -o "${JOB_DIR}/{jobId}.mp3" "{audioUrl}"NEW_CONFIG=$(echo "$CONFIG" | jq \
--arg lang "{language}" \
--arg style "{info/story}" \
--arg speakerId "{speakerId}" \
'. + {"language": $lang, "defaultStyle": $style, "defaultSpeakers": (.defaultSpeakers + {($lang): [$speakerId]})}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"shared/api-speakers.mdshared/speaker-selection.mdshared/api-storybook.mdshared/common-patterns.mdshared/config-pattern.md/speechcurl -sS -X POST "https://api.marswave.ai/openapi/v1/storybook/episodes" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sources": [{"type": "text", "content": "Introduce Claude Code: what it is, key features, and how to get started"}],
"speakers": [{"speakerId": "cozy-man-english"}],
"language": "en",
"mode": "info"
}'