This project converts PowerPoint presentations to PDF, performs AI analysis to create simplified explanations, and generates educational videos with voiceovers.
- Convert PowerPoint presentations to PDF
- AI-powered content analysis and simplification
- Text-to-speech audio generation
- Automatic video creation from slides and audio
- Generate study materials with term-definition pairs
Install all required packages using the command:
pip install comtypes PyPDF2 python-dotenv requests cryptography gtts playsound pydub moviepy PyMuPDF pyttsx3 pathlib- Clone the repository
- Set up your OpenAI API key:
- Create a
.envfile in the project root - Add your API key:
OPENAI_API_KEY=your_api_key_here
- Create a
- Create the following directory structure:
project_root/ ├── PPTX/ # Input PowerPoint files ├── PDF/ # Generated PDFs ├── Transcripts/ # AI-generated explanations ├── audio/ # Generated audio files └── Short-Form-Videos/ # Final video outputs
Run python main.py and choose from the following options:
-
Generate default PDFs
- Converts PowerPoint files to basic PDFs (1 slide per page)
-
Generate custom PDFs
- Enhanced PDF conversion with notes, hidden slides, and additional features
-
Run AI Analysis
- Analyzes PDFs and generates term-definition pairs
- Creates a
pairs.txtfile with study materials
-
Make Short-Form Content Lectures
- Creates simplified explanations of each slide
- Generates memorization techniques and examples
- Saves explanations in the Transcripts folder
-
Create Audio and Videos
- Converts text explanations to speech
- Combines slide images with audio
- Creates educational videos for each slide
main.py: Main program with user interface and PowerPoint conversionai.py: Handles AI analysis and content generationvoice.py: Text-to-speech conversion utilities
The project supports two text-to-speech engines:
- Google Text-to-Speech (gTTS): Better quality, internet required
- pyttsx3: Offline capability, adjustable speech rate
To list available voices:
python voice.py --list-voicesThe custom PDF generation includes:
- Notes pages
- Hidden slides
- Document properties
- Document structure tags
- High-quality bitmap fonts
For detailed export options, see Microsoft's PowerPoint VBA documentation.
PDF/: Contains converted PDF filesTranscripts/: Contains AI-generated explanationsaudio/: Contains generated MP3 files for each slideShort-Form-Videos/: Contains final videos with slides and voiceoverpairs.txt: Term-definition pairs for study materials
- Windows OS (for PowerPoint automation)
- Python 3.6 or higher
- Microsoft PowerPoint installed
- Internet connection (for OpenAI API and gTTS)
-
PowerPoint Automation
- Ensure Microsoft PowerPoint is installed
- Run the script with appropriate permissions
-
Audio Generation
- Check audio device settings
- Try alternative voice engine if one fails
-
Video Creation
- Ensure sufficient disk space
- Check write permissions in output directories
-
API Issues
- Verify OpenAI API key in
.env - Check internet connection
- Monitor API usage limits
- Verify OpenAI API key in