Generate AI video stories from text prompts. This tool takes your idea, expands it into a narrative, fetches beautiful images from Unsplash, converts the story to speech, and combines everything into a cinematic video with Ken Burns effects and subtitles.
cd ai-story-maker
python -m venv venv
source venv/bin/activate # Linux/Mac
For Windows with AMD GPU (DirectML):
pip install torch torchvision torchaudio
pip install torch-directml
For Linux with AMD GPU (ROCm):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2
For NVIDIA GPU (CUDA):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
sudo apt install imagemagick
python main.py -i
python main.py "A brave knight discovers a hidden dragon in an enchanted forest"
# Specify number of scenes (default: 3)
python main.py --scenes 5 "Space exploration adventure"
# Custom output path
python main.py -o my_video.mp4 "A peaceful morning in a Japanese garden"
# Fantasy story
python main.py "A wizard's apprentice accidentally opens a portal to another dimension"
# Nature documentary style
python main.py "The journey of a salmon swimming upstream"
# Sci-fi adventure
python main.py "First contact with an alien civilization on Mars"
output/ folderstory_YYYYMMDD_HHMMSS.mp4Create a .env file with your settings:
# Required: Unsplash API key
UNSPLASH_ACCESS_KEY=your_unsplash_access_key_here
# Optional: Use a different LLM model for story generation
LLM_MODEL=google/flan-t5-large
The first run downloads AI models (~3GB total):
vibe-voice/ folderModels are cached in ~/.cache/huggingface/.
User Prompt
↓
┌─────────────────────────────────────┐
│ Step 1: Story Generation (LLM) │
│ google/flan-t5-base │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 2: Keyword Extraction │
│ Extract scene keywords from story │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 3: Image Fetching │
│ Unsplash API (high-quality imgs) │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 4: Text-to-Speech │
│ VibeVoice-Realtime-0.5B │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 5: Video Assembly │
│ Ken Burns effect + audio + subs │
└─────────────────────────────────────┘
↓
Final Video (MP4)
UNSPLASH_ACCESS_KEY is set in .envai-story-maker/
├── main.py # CLI entry point
├── config.py # Configuration
├── story_generator.py # LLM story + keyword extraction
├── image_fetcher.py # Unsplash image fetching
├── video_creator.py # Video assembly with Ken Burns
├── tts_engine.py # Text-to-speech engine
├── vibevoice_tts.py # VibeVoice model interface
├── vibe-voice/ # Local VibeVoice model (optional)
├── requirements.txt # Dependencies
├── output/ # Generated videos
└── temp/ # Temporary files
MIT
1 commits
Python
100.0%
Generate AI video stories from text prompts. This tool takes your idea, expands it into a narrative, fetches beautiful images from Unsplash, converts the story to speech, and combines everything into a cinematic video with Ken Burns effects and subtitles.
cd ai-story-maker
python -m venv venv
source venv/bin/activate # Linux/Mac
For Windows with AMD GPU (DirectML):
pip install torch torchvision torchaudio
pip install torch-directml
For Linux with AMD GPU (ROCm):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2
For NVIDIA GPU (CUDA):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
sudo apt install imagemagick
python main.py -i
python main.py "A brave knight discovers a hidden dragon in an enchanted forest"
# Specify number of scenes (default: 3)
python main.py --scenes 5 "Space exploration adventure"
# Custom output path
python main.py -o my_video.mp4 "A peaceful morning in a Japanese garden"
# Fantasy story
python main.py "A wizard's apprentice accidentally opens a portal to another dimension"
# Nature documentary style
python main.py "The journey of a salmon swimming upstream"
# Sci-fi adventure
python main.py "First contact with an alien civilization on Mars"
output/ folderstory_YYYYMMDD_HHMMSS.mp4Create a .env file with your settings:
# Required: Unsplash API key
UNSPLASH_ACCESS_KEY=your_unsplash_access_key_here
# Optional: Use a different LLM model for story generation
LLM_MODEL=google/flan-t5-large
The first run downloads AI models (~3GB total):
vibe-voice/ folderModels are cached in ~/.cache/huggingface/.
User Prompt
↓
┌─────────────────────────────────────┐
│ Step 1: Story Generation (LLM) │
│ google/flan-t5-base │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 2: Keyword Extraction │
│ Extract scene keywords from story │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 3: Image Fetching │
│ Unsplash API (high-quality imgs) │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 4: Text-to-Speech │
│ VibeVoice-Realtime-0.5B │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Step 5: Video Assembly │
│ Ken Burns effect + audio + subs │
└─────────────────────────────────────┘
↓
Final Video (MP4)
UNSPLASH_ACCESS_KEY is set in .envai-story-maker/
├── main.py # CLI entry point
├── config.py # Configuration
├── story_generator.py # LLM story + keyword extraction
├── image_fetcher.py # Unsplash image fetching
├── video_creator.py # Video assembly with Ken Burns
├── tts_engine.py # Text-to-speech engine
├── vibevoice_tts.py # VibeVoice model interface
├── vibe-voice/ # Local VibeVoice model (optional)
├── requirements.txt # Dependencies
├── output/ # Generated videos
└── temp/ # Temporary files
MIT
1 commits
Python
100.0%