How ksy1022/zzongai_song works
ZZongAI turns study material into learning lyrics, a melody guide, and optionally a generated song. The web backend accepts image/text and file-based requests; image and PDF processing support input extraction, while the documented RAG workflow queries a nursery-rhyme collection and coordinates query, retrieval, reasoning, generation, and self-review. The workflow can submit a song request and return audio results. Relationships for sampled modules are cited; some documented capabilities and unsampled server integrations are shown only at the level supported by the README or source index.
Main entry points: workflow.py Pipeline Workflow · server.py FastAPI Backend · orchestrator.py RAG Orchestrator · run_pipeline.py CLI Entry
Components 21
User Interface
- Web Interface
web/static/main.js - FastAPI Backend
src/server.py - Generation Logging
dashboard_logs/logger.py
Study Input
- Image Text Extraction
src/processors/vision_to_query.py - Image Analysis
src/processors/image_analyzer.py - PDF Processing
src/processors/pdf_processor.py - Pipeline Workflow
src/core/workflow.py - CLI Entry
src/run_pipeline.py
RAG and Lyrics
- RAG Orchestrator
src/rag/orchestrator.py - Query Agent
src/rag/agents/query_agent.py - Retriever Agent
src/rag/agents/retriever_agent.py - Nursery Rhyme Index
src/rag/vector_db.py - Reasoner Agent
src/rag/agents/reasoner_agent.py - Lyrics Generator
src/rag/agents/generator_agent.py - Lyrics Review
src/rag/agents/self_rag_agent.py
Song Generation
- Lyrics Extractor
src/lyrics/lyrics_extractor.py - Song Prompt Builder
src/lyrics/compose_prompt.py - Suno Client
src/clients/suno_client.py - Audio Saving
src/core/mureka_utils.py
Other components
- Learner
- Suno AI
Connections 21
- Learner → Web Interface: submits material
README.md - Web Interface → FastAPI Backend: sends requests
- FastAPI Backend → Pipeline Workflow: runs pipeline
src/server.py - FastAPI Backend → Image Analysis: analyzes images
src/server.py - FastAPI Backend → PDF Processing: processes files
src/server.py - FastAPI Backend → RAG Orchestrator: generates lyrics
src/server.py - FastAPI Backend → Generation Logging: records events
src/server.py - CLI Entry → Pipeline Workflow: runs pipeline
src/run_pipeline.py - Pipeline Workflow → Image Text Extraction: extracts text
src/core/workflow.py - Pipeline Workflow → Lyrics Generator: creates guide
src/core/workflow.py - Pipeline Workflow → Song Prompt Builder: builds payload
src/core/workflow.py - Pipeline Workflow → Suno Client: requests song
src/core/workflow.py - Pipeline Workflow → Lyrics Extractor: extracts lyrics
src/core/workflow.py - RAG Orchestrator → Query Agent: interprets input
src/rag/orchestrator.py - RAG Orchestrator → Retriever Agent: retrieves examples
src/rag/orchestrator.py - RAG Orchestrator → Reasoner Agent: builds guidance
src/rag/orchestrator.py - RAG Orchestrator → Lyrics Generator: generates lyrics
src/rag/orchestrator.py - RAG Orchestrator → Lyrics Review: reviews lyrics
src/rag/orchestrator.py - Retriever Agent → Nursery Rhyme Index: searches index
src/rag/agents/retriever_agent.py - Suno Client → Suno AI: creates and polls
src/clients/suno_client.py - CLI Entry → Audio Saving: saves audio
src/run_pipeline.py