You are an expert AI agent working on DeepCast, an automated podcast generation engine based on the HelloAgents framework.
localhost:8000DeepResearchAgent coordinates the entire workflowPlanning → Research (parallel threads) → Summarization → Reporting → Script → TTS → Audio Synthesisplanner.py / summarizer.py / reporter.py — research phasesscript_generator.py — converts report to dialogueaudio_generator.py — TTS per dialogue turnaudio_synthesizer.py — FFmpeg stitchingsearch.py — hybrid search via hello_agents.tools.SearchTool/research/stream via fetch + ReadableStreamstatus, todo_list, task_status, search_result, summary, report, script, audio_progress, done, error, cancelledUser Topic → PlanningService (smart_llm) → TodoItems[]
→ [Parallel Workers] SearchTool → SummarizationService (fast_llm)
→ ReportingService (smart_llm) → ScriptGenerationService → AudioGenerationService → PodcastSynthesisService
→ Output: report.md + podcast.mp3
# Backend (requires .env configured from env.example)
cd backend && python src/main.py
# Frontend
cd frontend && npm install && npm run dev
# Verification scripts (run from project root)
python backend/scripts/verify_ecnu_llm.py # Test LLM
python backend/scripts/verify_ecnu_tts.py # Test TTS
python backend/scripts/verify_ffmpeg.py # Check FFmpeg
python backend/scripts/verify_search.py # Test search APIs
smart_llm (ecnu-reasoner): For complex reasoning — planning (todo_agent), reporting (report_agent)fast_llm (ecnu-max): For high-volume tasks — task summarization, script generationSMART_LLM_MODEL / FAST_LLM_MODELAgents are created in DeepResearchAgent.__init__ using ToolAwareSimpleAgent:
self.todo_agent = self._create_tool_aware_agent(
name="研究规划专家",
system_prompt=todo_planner_system_prompt, # from prompts.py
llm=self.smart_llm,
)
SummaryState, TodoItem, SummaryStateOutput<输出格式> section| Role | Voice ID | Character |
|---|---|---|
| Host (夏雨) | xiayu |
Curious, humorous, audience proxy |
| Guest (李华) | liwa |
Knowledgeable expert |
Voice mapping in backend/src/services/audio_generator.py _get_voice_for_role()
The run_stream() method in DeepResearchAgent uses a multi-threaded worker pattern:
TodoItem gets its own threadQueue and yielded to the SSE endpointcancel() / is_cancelled() / CancelledException| Issue | Solution |
|---|---|
| FFmpeg errors in synthesis | Set FFMPEG_PATH in .env (Windows: C:\ffmpeg\bin\ffmpeg.exe) |
| Empty search results | Ensure TAVILY_API_KEY or SERP_API_KEY is configured |
| LLM timeout | Increase LLM_TIMEOUT (default 60s) for complex topics |
| Notes not persisting | Check NOTES_WORKSPACE path exists and is writable |
| CORS issues | Frontend proxy in vite.config.ts; backend allows all origins by default |
backend/output/notes/ — note_*.md + notes_index.jsonbackend/output/audio/ — individual MP3s + final podcast_*.mp3/output/... via FastAPI StaticFiles