Language / Idioma / 语言: English | 中文 | Português
An AI video generation service based on FastAPI that supports a complete workflow from PPT to video, including PPT parsing, text-to-speech, video synthesis, and virtual human functionality.
This project provides API interface services for the Maker platform. After deployment, you need to configure the public network address to the Maker's HOST ENDPOINT node to call this service's API interfaces in Maker workflows.
- 📄 PPT Parsing & Processing - Convert PPT/PPTX files to images with context management
- 🔊 Text-to-Speech (TTS) - Support for multiple TTS providers with automatic subtitle generation
- 📤 File Upload Management - Upload, download, and manage various file types
- 🎬 Video Synthesis - Combine images, audio, subtitles, and virtual human videos into complete videos
- 👤 Virtual Human Synthesis - Generate virtual human videos with lip-sync based on text
- Python 3.11+
- Docker (optional, for containerized deployment)
- Clone the repository
git clone <repository-url>
cd hackathon-AIVidFromPPT- Install system dependencies
The project requires the following system tools. Install them according to your operating system:
# Install using Homebrew
brew install libreoffice poppler ffmpeg fontconfigsudo apt-get update
sudo apt-get install -y \
libreoffice \
libreoffice-writer \
libreoffice-impress \
poppler-utils \
ffmpeg \
fontconfig- LibreOffice: Download and install from official website
- Poppler: Download from GitHub, extract and add to PATH
- FFmpeg: Download from official website, extract and add to PATH
- Fontconfig: Usually included in the system
Notes:
libreoffice- For converting PPT/PPTX files to imagespoppler-utils- For PDF processing and image extractionffmpeg- For video and audio processingfontconfig- For font management (Chinese font support)
- Create virtual environment
conda create -n aividfromppt python=3.11 -y
conda activate aividfromppt- Install Python dependencies
cd server
pip install -r requirements.txt- Configure environment variables
Create a .env file (or copy from .env.example):
OPENAI_API_KEY=your-openai-api-key-here- Start the service
uvicorn main:app --host 0.0.0.0 --port 8201 --reload- Access API documentation
Open your browser and visit: http://localhost:8201/docs
To ensure stable service operation, it is recommended to use a cloud server with the following configuration:
- Recommended Configuration: 8 CPU cores + 16GB RAM
- Minimum Configuration: 4 CPU cores + 8GB RAM
- Storage: At least 50GB available space (for storing uploaded files and generated videos)
Notes:
- Video synthesis and virtual human generation are compute-intensive tasks that require sufficient CPU and memory resources
- Larger memory helps process large PPT files and video files
- Sufficient storage space is needed to save user-uploaded files and generated videos
docker run -d \
--name aividfromppt \
--restart=always \
-p 8201:8201 \
-e OPENAI_API_KEY="your-openai-api-key-here" \
-v $(pwd)/server/uploads:/app/uploads \
unhejing/aividfromppt:latestIf you don't have a local deployment environment, you can directly use our online service for testing:
- Service Address:
http://154.40.41.212:8201 - API Documentation:
http://154.40.41.212:8201/docs - Interactive Documentation:
http://154.40.41.212:8201/redoc
Usage Notes:
- All API endpoints can be accessed directly through the above address
- When configuring HOST ENDPOINT in the Maker platform, use
http://154.40.41.212:8201as the service address - No need to install any dependencies or configure the environment, ready to use out of the box
⚠️ Important Notice: Due to server resource limitations, when using the online service for Maker testing, please ensure that uploaded PPT files do not exceed 5 pages to ensure stable service operation.
All API endpoints follow RESTful conventions with base path /api/v1.
POST /upload- Upload PPT/PPTX file and convert to imagesGET /image- Get converted imagesPOST /context- Add context dataPUT /context- Update context dataDELETE /context- Delete context dataGET /context/{uuid}- Get context data
POST /synthesize- Text-to-speech synthesis- Supports OpenAI TTS
- Automatically generates SRT subtitle files
- Returns audio file URL and metadata
GET /files/{file_path}- Get audio or subtitle filesGET /channels- Get list of supported TTS channels
POST /file- Upload a single file (max 50MB)POST /files- Upload multiple filesGET /files/{file_path}- Get uploaded fileDELETE /file/{file_path}- Delete fileGET /list- List all uploaded files
Supported file types: images, documents, videos, audio, subtitles, archives, etc.
POST /synthesize- Synthesize video- Supports multi-segment video synthesis
- Supports overlaying images, audio, subtitles, and virtual human videos
- Returns video ID and access URL
GET /{video_id}- Get video informationGET /{video_id}/download- Download video fileGET /health- Health check
POST /generate-video- Generate virtual human video- Generate lip-sync video based on text
- Supports Chinese and English mixed content
- Supports gender selection
- Web Framework: FastAPI
- Python Version: 3.11
- Main Dependencies:
- OpenAI API (TTS)
- MoviePy (Video processing)
- PyMuPDF (PDF processing)
- LibreOffice (PPT conversion)
- FFmpeg (Video/audio processing)
hackathon-AIVidFromPPT/
├── server/ # Backend service
│ ├── pptToImg/ # PPT parsing and processing
│ ├── tts/ # Text-to-speech
│ ├── upload/ # File upload management
│ ├── video/ # Video synthesis
│ ├── virtual/ # Virtual human synthesis
│ ├── main.py # Application entry point
│ └── requirements.txt # Python dependencies
├── .setup/ # Deployment configuration
│ ├── Dockerfile # Docker image build
│ └── build_and_push_dockerhub.sh # Image build script
├── docs/ # Project documentation
└── README.md # Project description
| Variable | Required | Description | Default |
|---|---|---|---|
OPENAI_API_KEY |
✅ | OpenAI API key | None |
After deployment, you need to configure the HOST ENDPOINT node in the Maker platform:
- Get the public network address of your service (e.g.,
http://your-domain.comorhttp://your-ip:8201) - Add a HOST ENDPOINT node in your Maker workflow
- Enter the public network address in the node configuration
Configuration example:
Configuration Notes:
- Enter the public network address in the Template field, e.g.,
http://154.40.41.212:8201 - Ensure the service is properly deployed and accessible from the public network
- After configuration, you can call all API interfaces of this service in Maker workflows
We provide a complete Maker workflow configuration file that you can import and use directly:
📄 Download Maker Workflow Source File - Contains complete workflow configuration
Usage Instructions:
- Download the workflow source file
AIVidFromPPT.json - Import the workflow in the Maker platform
- Modify the service address in the HOST ENDPOINT configuration according to your actual situation
- Run the workflow to start using
⚠️ Important Notice: Due to server resource limitations, when testing with the online service, please ensure that uploaded PPT files do not exceed 5 pages.
The following are example video results generated by calling this service through the Maker platform:
Note: GitHub README does not support direct video playback. Please click the links below to download and view the videos, or use a Markdown viewer that supports video playback.
📄 Download Original PPT File - This is the source file used to generate the videos
📹 Download Portuguese Demo Video
- API Documentation: http://154.40.41.212:8201/docs
- Interactive API Documentation: http://154.40.41.212:8201/redoc

