Transform spoken content into high-converting video ads in seconds.
A sophisticated AI-driven pipeline that ingests audio/video transcripts, analyzes them using NLP, and automatically generates ready-to-use video ad scripts, storyboards, and previews.
- Deep Content Analysis: Uses NLP (spaCy) to extract keywords, named entities, and key highlights from transcripts.
- Intelligent Ad Generation:
- LLM Mode: Uses structured prompting to create professional ad copy with compelling CTAs.
- Simple Mode: Deterministic rule-based generation for fast local testing.
- Visual Storyboarding: Automatically maps ad copy to visual frames.
- Video Previews: Renders MP4 video previews on-the-fly using MoviePy.
- Interactive UI: A polished Streamlit interface with premium aesthetics, dark mode, and real-time feedback.
- Background Processing: Supports asynchronous rendering via Redis Queue (RQ) for heavy workloads.
- Smart Caching: Built-in system for caching expensive API calls and rendering steps.
- Production Ready: Dockerized and includes robust logging and error handling.
- Frontend: Streamlit (Custom CSS for premium UI)
- Core Logic: Python 3.9+
- NLP: spaCy, TextBlob
- Video Processing: MoviePy, Pillow
- Async Workers: Redis, RQ (Redis Queue)
- Containerization: Docker & Docker Compose
- Quality: pytest, flake8, mypy, pre-commit
- Python 3.9+
- FFmpeg (required for local video rendering)
- Docker (optional, for containerized execution)
-
Clone the repository:
git clone https://github.com/your-org/transcript-to-ad.git cd transcript-to-ad -
Set up environment:
python -m venv .venv # Windows: .\.venv\Scripts\Activate # Linux/Mac: source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
streamlit run app.py
-
Open
http://localhost:8501in your browser.
Easily spin up the entire stack including the Redis worker:
docker-compose up --buildThe app will be available at http://localhost:8501.
transcript-to-ad/
├── core/ # Business Logic & Pipeline
│ ├── analysis.py # NLP & Text Analysis
│ ├── ad_generator.py # Ad Copy Generation Logic
│ ├── video.py # Video Rendering (MoviePy)
│ ├── pipeline.py # Main Orchestration
│ ├── gap_scanner.py # Opportunity Detection
│ ├── llm.py # LLM Integration
│ ├── nlg.py # Natural Language Generation
│ └── queue.py # Redis Queue Interface
├── scripts/ # Utility Scripts (Worker, Redis helpers)
├── tests/ # Unit & Integration Tests
├── app.py # Main Streamlit Application
├── run_local.py # CLI Runner for Pipeline
├── Dockerfile # App Container Config
├── Dockerfile.worker # Worker Container Config
└── requirements.txt # Python Dependencies
Run the test suite to ensure everything is working correctly:
# Run unit tests
pytest tests/
# Run type checks
mypy core/
# Run linter
flake8 core/You can also run the pipeline directly from the command line without the UI:
python run_local.pyThis will process a sample transcript and print the detailed analysis and ad copy to the console.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Generated for the Transcript-to-Ad Project.