Loading...
Loading...
Create podcasts from topics, URLs, or text. Triggers on: "做播客", "podcast", "播客", "录一期节目", "chat about", "discuss", "debate", "dialogue", "make a podcast about".
npx skill4agent add marswaveai/skills podcast/speech/explainer/image-gen/content-parsershared/authentication.mdshared/common-patterns.mdshared/config-pattern.mdshared/speaker-selection.md~/Downloads/.listenhub/podcast/shared/config-pattern.mdshared/config-pattern.mdmkdir -p ".listenhub/podcast"
echo '{"outputDir":".listenhub","outputMode":"inline","language":null,"defaultMode":null,"defaultMethod":null,"defaultSpeakers":{}}' > ".listenhub/podcast/config.json"
CONFIG_PATH=".listenhub/podcast/config.json"
# (or $HOME/.listenhub/podcast/config.json for global)当前配置 (podcast):
输出方式:{inline / download / both}
语言偏好:{zh / en / 未设置}
默认模式:{quick / deep / debate / 未设置}
默认生成方式:{one-step / two-step / 未设置}
默认主播:{speakerName(s) / 未设置}shared/output-mode.mdnullnulldefaultMethod: "one-step"defaultMethod: "two-step"null# 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 topic or content would you like to turn into a podcast?
config.defaultModeQuestion: "What podcast generation mode?"
Options:
- "Quick" — Short, concise overview (~5 min)
- "Deep" — Thorough analysis with more detail (~10-15 min)
- "Debate" — Two speakers with opposing views (requires 2 speakers)config.languageQuestion: "What language?"
Options:
- "Chinese (zh)" — Content in Mandarin Chinese
- "English (en)" — Content in EnglishQuestion: "How many speakers?"
Options:
- "1 speaker (solo)" — Monologue style
- "2 speakers (dialogue)" — Conversation styleshared/speaker-selection.mdconfig.defaultSpeakers.{language}Question: "Any reference materials to include?"
Options:
- "Yes, URL(s)" — Provide URLs to analyze
- "Yes, text" — Paste reference text
- "No references" — Generate from topic aloneconfig.defaultMethodQuestion: "How would you like to generate?"
Options:
- "One step (recommended)" — Generate text + audio together, faster
- "Two steps (review first)" — Generate text, review/edit, then generate audioReady to generate podcast:
Topic: {topic}
Mode: {mode}
Language: {language}
Speakers: {speaker name(s)}
References: {yes/no}
Method: {one-step/two-step}
Proceed?POST /podcast/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/podcast/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.mdinlinebothaudioUrl播客已生成!
在线收听:{audioUrl}
字幕:{subtitlesUrl}(如有)
时长:{audioDuration / 1000}s
消耗积分:{credits}downloadbothDATE=$(date +%Y-%m-%d)
JOB_DIR=".listenhub/podcast/${DATE}-{episodeId}"
mkdir -p "$JOB_DIR"
curl -sS -o "${JOB_DIR}/{episodeId}.mp3" "{audioUrl}"POST /podcast/episodes/text-contentepisodeIdjqpodcast/episodes/text-content/{episodeId}run_in_background: truetimeout: 600000.listenhub/podcast/YYYY-MM-DD-{episodeId}/{episodeId}-draft.md**{speakerName}**: {content}{episodeId}-draft.jsonscriptsPOST /podcast/episodes/{episodeId}/audio{}POST /podcast/episodes/{episodeId}/audio{scripts: [...]}jqrun_in_background: truetimeout: 600000curl -sS -o .listenhub/podcast/{dir}/{episodeId}.mp3 {audioUrl}NEW_CONFIG=$(echo "$CONFIG" | jq \
--arg lang "{language}" \
--arg mode "{mode}" \
--arg method "{one-step/two-step}" \
--argjson speakers '{"{language}": ["{speakerId}"]}' \
'. + {"language": $lang, "defaultMode": $mode, "defaultMethod": $method, "defaultSpeakers": (.defaultSpeakers + $speakers)}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"shared/api-speakers.mdshared/speaker-selection.mdshared/api-podcast.mdshared/common-patterns.mdshared/config-pattern.mdcurl -sS -X POST "https://api.marswave.ai/openapi/v1/podcast/episodes" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sources": [{"type": "text", "content": "The latest AI developments"}],
"speakers": [{"speakerId": "cozy-man-english"}],
"language": "en",
"mode": "deep"
}'