slide-to-video-converter
by @hzsunzixiang
End-to-end pipeline for converting PPT/PPTX/PDF slides with speaker notes into narrated MP4 videos. Defaults to Edge TTS (Microsoft free online API) for univ...
clawhub install slide-to-video-converterπ About This Skill
name: slide-to-video-converter description: "End-to-end pipeline for converting PPT/PPTX/PDF slides with speaker notes into narrated MP4 videos. Defaults to Edge TTS (Microsoft free online API) for universal compatibility. Supports three TTS modes: Edge TTS (default), Qwen3-TTS (local GPU acceleration), and HTTP service. Features audio validation, auto-synced subtitles, batch processing, and PPTX support via LibreOffice conversion. Input: PPT/PPTX/PDF file + JSON subtitles. Output: High-quality MP4 video with narration and subtitles. Use when users want to: (1) Automate video creation from presentations, (2) Generate training/lecture videos with TTS, (3) Batch produce slide-based content, (4) Create videos with consistent quality control, (5) Convert PPTX files to video."
Slide to Video Converter
Complete end-to-end pipeline for converting PPT/PPTX/PDF slides with speaker notes into high-quality narrated MP4 videos with auto-synced subtitles.
Architecture
3-Stage Pipeline with Audio Validation
Stage 1: Audio Generation & Validation
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PPTX/PDF β Images (png) β
β Script β TTS β Audio β STT Validation β Validated Audioβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββStage 2: Per-Slide Video Composition
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Image + Validated Audio + Subtitle β Individual MP4 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Stage 3: Final Video Assembly
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Merge All Slide Videos β final.mp4 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
TTS Mode Support
PPTX Support
Workflow
Step 1: Prepare Inputs
Require two inputs from the user:
1. Slide file: PPT/PPTX or PDF. Supports automatic PPTX conversion: - PPTX: Uses LibreOffice for high-quality conversion (recommended) - PDF: Direct conversion using pdf2image - Auto-detection: Automatically uses PPTX if PDF not available
2. Speaker notes: A JSON file with per-page narration. See references/script-format.md for the expected format.
Step 2: Install Dependencies
# System dependencies
brew install poppler ffmpeg libreoffice # macOS (add libreoffice for PPTX support)
apt install poppler-utils ffmpeg libreoffice # Linux
Python dependencies
pip install -U mlx-audio soundfile numpy edge-tts pdf2image Pillow moviepy python-pptxOptional: HTTP service dependencies
pip install fastapi uvicorn python-multipart
Step 3: Run Pipeline (Default: Edge TTS)
Default Mode: Edge TTS - Free online API (recommended for universal compatibility)
python scripts/pipeline.py
PPTX Support Options:
# Use PPTX file (if both PDF and PPTX exist)
python scripts/pipeline.py --use-pptxForce PPTX conversion even if PDF exists
python scripts/pipeline.py --use-pptx --force-audioPPTX with fallback method (no LibreOffice required)
python scripts/pipeline.py --use-pptx --fallback
Alternative TTS Modes:
Edge TTS - Free online API, no local model required (default)
python scripts/pipeline.py --tts-edge
HTTP Service - Independent TTS server for multi-client usage
# Start TTS server
python scripts/tts_server.py &
Run pipeline
python scripts/pipeline.py --tts-http
Qwen3-TTS - Local GPU acceleration
python scripts/pipeline.py --tts-direct
Step 4: Run Pipeline
# Full pipeline with audio validation
python scripts/pipeline.pySpecific slides only
python scripts/pipeline.py --slides 1-5Fast preview mode (lower quality, quicker)
python scripts/pipeline.py --fastSkip image generation (use existing)
python scripts/pipeline.py --skip-imagesForce regenerate audio
python scripts/pipeline.py --force-audioSkip audio validation (use existing audio as-is)
python scripts/pipeline.py --skip-validationCustom validation threshold
python scripts/pipeline.py --threshold 0.7 --max-retries 3
Step 5: Customize
Edit config.json to adjust:
Available TTS Voices
Edge TTS Voices (Default - Online API)
| Voice | Gender | Style | |-------|--------|-------| |serena | Female | Warm, natural (default) |
| chelsea | Female | Professional, clear |
| max | Male | Authoritative, deep |
| brian | Male | Friendly, energetic |Edge TTS Chinese Voices (Online API)
| Voice | Gender | Style | |-------|--------|-------| |zh-CN-YunyangNeural | Male | Professional news anchor (default) |
| zh-CN-XiaoxiaoNeural | Female | Warm, natural |
| zh-CN-YunjianNeural | Male | Energetic sports |
| zh-CN-XiaoyiNeural | Female | Lively cartoon |
| zh-CN-YunxiNeural | Male | Sunny, cheerful |List all Edge voices: edge-tts --list-voices | grep zh-CN
Key Design Decisions
Resources
This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
scripts/
Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.Examples from other skills:
fill_fillable_fields.py, extract_form_field_info.py - utilities for PDF manipulationdocument.py, utilities.py - Python modules for document processingAppropriate for: Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
Note: Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
references/
Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.Examples from other skills:
communication.md, context_building.md - detailed workflow guidesAppropriate for: In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
assets/
Files not intended to be loaded into context, but rather used within the output Claude produces.Examples from other skills:
Appropriate for: Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
Any unneeded directories can be deleted. Not every skill requires all three types of resources.