How jaswanthroyg/storyforageai works
StoryForge AI is a CLI that turns a user’s story into a timed scene plan, generates per-scene images and narration, renders scene videos, then merges them with background music into an MP4. The pipeline coordinates these stages and handles stage-level failures; its runtime also creates a project folder and saves the plan. The graph reflects the documented workflow and sampled calls. The README describes capabilities such as configurable duration; unsampled internals are represented only where the documentation supports them.
Main entry points: pipeline.py Generation pipeline · story.py Scene planner · composer.py Scene video composer · merge.py Video merger and music mix
Components 16
CLI and orchestration
- Story CLI
main.py - Generation pipeline
pipeline.py
Planning and assets
- Scene planner
ai/story.py - Retry helper
utils/retry.py - Gemini API
- Scene image generator
ai/image.py - Pixazo API
- Narration generator
ai/audio.py - Edge TTS
Video rendering
- Scene video composer
video/composer.py - FFmpeg
- Video merger and music mix
video/merge.py
Project output
- Project and plan files
utils/files.py - Background music file
- Project assets and final MP4
Other components
- Story author
Connections 19
- Story author → Story CLI: enters story
main.py - Story CLI → Generation pipeline: runs workflow
main.py - Generation pipeline → Scene planner: requests scene plan
pipeline.py - Scene planner → Retry helper: retries generation
ai/story.py - Scene planner → Gemini API: generates plan
ai/story.py - Generation pipeline → Project and plan files: creates project and saves plan
pipeline.py - Generation pipeline → Scene image generator: generates scene images
pipeline.py - Scene image generator → Pixazo API: requests image generation
ai/image.py - Generation pipeline → Narration generator: generates narration
pipeline.py - Narration generator → Edge TTS: synthesizes speech
ai/audio.py - Generation pipeline → Scene video composer: composes scene videos
pipeline.py - Scene video composer → FFmpeg: renders scenes
video/composer.py - Generation pipeline → Video merger and music mix: merges scene videos
pipeline.py - Video merger and music mix → FFmpeg: merges and mixes audio
video/merge.py - Generation pipeline → Background music file: configures music path
pipeline.py - Project and plan files → Project assets and final MP4: writes plan and project
utils/files.py - Scene video composer → Project assets and final MP4: writes scene videos
- Video merger and music mix → Project assets and final MP4: writes final MP4
video/merge.py - Project assets and final MP4 → Story CLI: reports final video
main.py