daily-news-caster
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDaily News Caster Skill
每日新闻播报技能
This skill allows the agent to fetch real-time news, organize it into a conversational podcast script, and generate an audio file reading the script out loud.
本技能可让Agent获取实时新闻,将其整理为对话式播客脚本,并生成朗读该脚本的音频文件。
Workflow Instructions
工作流程说明
When the user asks to get the latest news and make a podcast out of it, follow these steps strictly:
当用户要求获取最新新闻并将其制作成播客时,请严格遵循以下步骤:
Step 1: Ensure Skills are Installed
步骤1:确认技能已安装
If the and skills are not already installed in the workspace, run the following commands to install them:
news-aggregator-skillttsbash
npx skills add https://github.com/cclank/news-aggregator-skill --skill news-aggregator-skill -y
npx skills add https://github.com/noizai/skills --skill tts -y如果工作区中尚未安装和技能,请运行以下命令进行安装:
news-aggregator-skillttsbash
npx skills add https://github.com/cclank/news-aggregator-skill --skill news-aggregator-skill -y
npx skills add https://github.com/noizai/skills --skill tts -yStep 2: Fetch the Latest News
步骤2:获取最新新闻
Find the script from the (usually located in or ).
fetch_news.pynews-aggregator-skill.cursor/skills/news-aggregator-skill/scripts/fetch_news.pyskills/news-aggregator-skill/scripts/fetch_news.pyRun the script to fetch real-time news. You can specify a source (e.g., , , ) or keywords based on the user's request.
Example command:
hackernewsgithuballbash
python3 path/to/fetch_news.py --source all --limit 10 --deep在中找到脚本(通常位于或路径下)。
news-aggregator-skillfetch_news.py.cursor/skills/news-aggregator-skill/scripts/fetch_news.pyskills/news-aggregator-skill/scripts/fetch_news.py运行该脚本以获取实时新闻。你可以根据用户需求指定新闻来源(例如、、)或关键词。示例命令:
hackernewsgithuballbash
python3 path/to/fetch_news.py --source all --limit 10 --deepStep 3: Write the Podcast Script
步骤3:撰写播客脚本
Read the fetched news data and rewrite the information into a Markdown podcast script.
Crucially, prioritize a dual-host (two-person) conversational format (e.g., Host A and Host B) in a dynamic Q&A style.
The script should be:
- Dual-Host Conversational yet concise: Write an engaging back-and-forth between two hosts. Host A should ask insightful, high-value questions to guide the conversation, and Host B should provide informative, concise answers. It should feel like a smart, fast-paced Q&A dialogue.
- Avoid fluff: Do not include unnecessary fluff or overly long transitions. Keep it to the point (言简意赅) while retaining all critical information and facts.
- Clearly Labeled Speakers: Start each line or paragraph with the speaker's name (e.g., or
Host A:).Host B: - Structured: Use markdown headings and clear paragraphs.
- Clear text for speech: Avoid complex URLs, raw markdown links, or unpronounceable characters in the spoken text.
Save this script to a local file named .
podcast_script.mdExample Content:
podcast_script.mdmarkdown
**Host A:** Welcome to today's news roundup. We have some exciting tech updates today. To start things off, there's a big update from [Company Name]. What are the core implications of their new release for everyday users?
**Host B:** The main takeaway is that... [Insert concise answer and summary of News Item 1]. This completely changes how we approach [Topic].
**Host A:** That's fascinating. But does this new approach raise any security concerns, especially given recent data breaches?
**Host B:** Exactly. Experts are pointing out that... [Insert analysis or context].
**Host A:** Moving on to the open-source world, what's trending on GitHub today that developers should pay attention to?
**Host B:** A standout project is... [Insert concise summary of News Item 2].
**Host A:** Great insights. That's all for today's quick update. Thanks for tuning in!读取获取到的新闻数据,将信息重写为Markdown格式的播客脚本。核心要求:优先采用双主持人(双人)对话格式(例如Host A和Host B),使用生动的问答风格。
脚本需要满足以下要求:
- 双主持人对话且简洁: 撰写两个主持人之间有吸引力的互动内容。Host A需提出有洞察力、高价值的问题引导对话,Host B需提供信息丰富、简洁的回答。整体要呈现出睿智、快节奏的问答对话感。
- 避免冗余内容: 不要加入无意义的废话或过长的过渡内容。在保留所有关键信息和事实的前提下做到言简意赅。
- 清晰标注发言者: 每一行或段落开头标注发言者姓名(例如或
Host A:)。Host B: - 结构清晰: 使用Markdown标题和清晰的段落划分。
- 适合朗读的文本: 朗读文本中避免出现复杂URL、原生Markdown链接或无法发音的字符。
将该脚本保存为本地文件,命名为。
podcast_script.mdpodcast_script.mdmarkdown
**Host A:** Welcome to today's news roundup. We have some exciting tech updates today. To start things off, there's a big update from [Company Name]. What are the core implications of their new release for everyday users?
**Host B:** The main takeaway is that... [Insert concise answer and summary of News Item 1]. This completely changes how we approach [Topic].
**Host A:** That's fascinating. But does this new approach raise any security concerns, especially given recent data breaches?
**Host B:** Exactly. Experts are pointing out that... [Insert analysis or context].
**Host A:** Moving on to the open-source world, what's trending on GitHub today that developers should pay attention to?
**Host B:** A standout project is... [Insert concise summary of News Item 2].
**Host A:** Great insights. That's all for today's quick update. Thanks for tuning in!Step 4: Generate the Podcast Audio
步骤4:生成播客音频
Use the skill to convert the script into an audio file. Since it's a dual-host format, you must use the Timeline Mode of the skill.
ttsttsFind the script (usually located in or ).
tts.shskills/tts/scripts/tts.sh.cursor/skills/tts/scripts/tts.sh1. Generate SRT: Convert the script to SRT format.
bash
bash path/to/tts.sh to-srt -i podcast_script.md -o podcast.srt2. Create a Voice Map ():
Map the lines in the SRT to the corresponding host. If the user provided reference audio files or URLs for the two roles, you MUST use them via the field (requires backend). Otherwise, assign default distinct voices.
voice_map.jsonreference_audionoizjson
{
"default": { "voice_id": "voice_host_A", "target_lang": "zh" },
"segments": {
"1": { "reference_audio": "path/or/url_to_user_audio_for_host_A.wav" },
"2": { "reference_audio": "path/or/url_to_user_audio_for_host_B.wav" },
"3": { "reference_audio": "path/or/url_to_user_audio_for_host_A.wav" }
}
}(Adjust the segment numbers corresponding to the generated SRT lines for Host A and Host B).
3. Render Audio:
bash
undefined使用技能将脚本转换为音频文件。由于是双主持人格式,你必须使用技能的时间线模式。
ttstts找到脚本(通常位于或路径下)。
tts.shskills/tts/scripts/tts.sh.cursor/skills/tts/scripts/tts.sh1. 生成SRT: 将脚本转换为SRT格式。
bash
bash path/to/tts.sh to-srt -i podcast_script.md -o podcast.srt2. 创建音色映射():
将SRT中的台词映射到对应的主持人。如果用户为两个角色提供了参考音频文件或URL,你必须通过字段使用它们(需要后端支持)。否则分配默认的不同音色。
voice_map.jsonreference_audionoizjson
{
"default": { "voice_id": "voice_host_A", "target_lang": "zh" },
"segments": {
"1": { "reference_audio": "path/or/url_to_user_audio_for_host_A.wav" },
"2": { "reference_audio": "path/or/url_to_user_audio_for_host_B.wav" },
"3": { "reference_audio": "path/or/url_to_user_audio_for_host_A.wav" }
}
}请根据生成的SRT中Host A和Host B对应的台词调整片段编号。
3. 渲染音频:
bash
undefinedIf using user's reference_audio, use the noiz backend
If using user's reference_audio, use the noiz backend
bash path/to/tts.sh render --srt podcast.srt --voice-map voice_map.json --backend noiz -o podcast_output.mp3
undefinedbash path/to/tts.sh render --srt podcast.srt --voice-map voice_map.json --backend noiz -o podcast_output.mp3
undefinedStep 5: Present the Result
步骤5:展示结果
Let the user know that the podcast has been successfully generated. You MUST provide both files back to the user:
- Show or link to the file so they can read the script.
podcast_script.md - Provide the path to the file so they can listen to the audio.
podcast_output.mp3 - Briefly summarize the headlines that were included in the podcast.
告知用户播客已成功生成。你必须向用户提供以下两个文件:
- 展示文件或提供其链接,方便用户查看脚本。
podcast_script.md - 提供文件的路径,方便用户收听音频。
podcast_output.mp3 - 简要总结播客中包含的新闻头条。