Video Meeting Summarizer is an advanced tool that automatically condenses long videos (meetings, lectures, presentations) into concise summaries by analyzing speech transcripts. Inspired by the research paper "Automated video summarization using speech transcripts", this project implements an intelligent algorithm that segments videos based on speech patterns and ranks segments by content importance.
- Documentaries: Condense long documentary films while preserving key information
- Educational Videos: Summarize lectures and instructional videos for easier review
- Presentations: Create concise versions of conference talks and business presentations
- Meeting Recordings: Distill important content from lengthy video conference calls
The summarization algorithm follows a comprehensive pipeline:
- Audio Extraction: Extract audio track from the video file
- Speech Recognition: Generate accurate transcripts using Whisper AI
- Segmentation: Divide transcript into logical segments based on speech pauses
- Segment Scoring: Rank segments by:
- Word frequency analysis
- Important word pair co-occurrence
- Dominant word pair detection
- Video Skim Generation: Select highest-scoring segments to create a condensed video summary
- Final Processing: Concatenate selected segments into a seamless summary video
- Python 3.8+
- FFmpeg (for audio/video processing)
- Required Python packages (see
requirements.txt)
- Clone the repository:
git clone https://github.com/your-org/video-meet-summarizer.git
cd video-meet-summarizer- Install required packages:
pip install -r requirements.txt- Make sure FFmpeg is installed and available in your system PATH.
The application exposes a FastAPI endpoint for video summarization:
POST /api/v1/summarize
Parameters:
file: The video file to summarize (multipart/form-data)summary_type: Type of summary to generateuser_id: Optional user identifier
You can also invoke the summarization pipeline directly:
from app.utils.pipeline import summary_video
from pathlib import Path
# Summarize a video with default 5-minute target length
await summary_video(
video_path=Path("path/to/your/video.mp4"),
target_duration=300, # 5 minutes (in seconds)
model_name="base" # Whisper model size
)video-meet-summarier/
├── README.md
├── requirements.txt
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application entry point
│ ├── config.py # Configuration management
│ ├── apis/ # API endpoint definitions
│ ├── models/ # Data models
│ ├── static/ # Static assets (CSS, JS)
│ ├── templates/ # HTML templates
│ └── utils/ # Utility modules
│ ├── calc_score.py # Segment scoring
│ ├── extract.py # Audio extraction & transcription
│ ├── pipeline.py # Main processing pipeline
│ ├── segmentation.py # Transcript segmentation
│ ├── skim_generator.py # Video summary generation
│ └── video_processor.py # Video manipulation functions
└── data/ # Data storage directory
├── audio/ # Extracted audio files
├── summaries/ # Generated video summaries
├── temp_skims/ # Temporary processing files
├── transcript/ # Generated transcripts
└── video/ # Original uploaded videos
The application is configurable via the Config class in app/config.py. Key parameters include:
-
Segmentation Parameters:
SEGMENTATION_N: Speech pause threshold (1.5 seconds default)SEGMENTATION_M: Minimum segment length (10 seconds default)
-
Scoring Parameters:
SCORING_K: Word frequency weight (2.0 default)SCORING_B: Base scoring factor (0.75 default)DOMINANT_PAIR_COUNT: Number of word pairs to consider (30 default)DOMINANT_PAIR_BOOST: Boost factor for important pairs (1.2 default)
-
Model Configuration:
WHISPER_MODEL_NAME: Whisper model size ("base" default)
The segmentation process divides transcripts based on natural speech pauses:
- A new segment begins when a pause exceeds threshold N (default 1.5 seconds)
- Segments shorter than threshold M (default 10 seconds) are merged
- Each segment contains word timing information for precise video cutting
Segments are scored using a sophisticated algorithm that considers:
- Word frequency within the document
- Co-occurrence patterns of important word pairs
- Presence of dominant topic-related terms
- Segment length normalization
- Whisper API Integration: Leverages OpenAI's Whisper for accurate speech recognition
- Asynchronous Processing: Uses
asynciofor efficient audio/video processing - FastAPI Web Service: Provides a modern, high-performance API interface
- Pydantic Models: Ensures data validation and serialization
Contributions to improve Video Meeting Summarizer are welcome. Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This project is based on research from: