Generate interactive HTML magazines that turn AI news into stories for 3-6 year olds, with TTS audio narration.
Gather 3-5 current AI news items from reliable sources (36氪, 澎湃, TechCrunch, etc.). For each item, extract:
Transform each news item into a kids story. Each story needs:
Prerequisite: pip3 install edge-tts
python3 scripts/generate_audio.py --stories stories.json --voice zh-CN-XiaoxiaoNeural --output-dir ./output
Voices: zh-CN-XiaoxiaoNeural (女声, recommended), zh-CN-YunxiNeural (男声), zh-CN-XiaoyiNeural (女童声)
TTS text rules:
Use assets/template.html as the base. The template includes:
For custom builds: python3 scripts/build_magazine.py --stories stories.json --template assets/template.html --output output/index.html
# Local preview
python3 -m http.server 8899 -d ./output
# Public sharing (install once: brew install cloudflared)
cloudflared tunnel --url http://localhost:8899
See references/example-stories.json for a complete 3-story example. Key fields:
{
"title": "故事标题",
"icon": "🤖",
"paragraphs": ["HTML段落1", "段落2"],
"tts_text": "纯中文朗读文本,无英文",
"dialogue": [
{"role": "child", "avatar": "👶", "text": "问题"},
{"role": "parent", "avatar": "👩", "text": "回答"}
],
"parent_note": "给家长的背景说明",
"source_name": "来源名",
"source_url": "https://..."
}
共 1 个版本