An AI-powered Video Intelligence Assistant that can transcribe, summarize, and chat with YouTube videos or local audio/video files.
The system supports both English and Hindi/Hinglish content and uses Retrieval-Augmented Generation (RAG) to enable intelligent question-answering directly from video transcripts.
Built using Whisper, Sarvam AI, Mistral AI, LangChain, ChromaDB, and Streamlit.
- 🎬 Analyze YouTube videos or local media files
- 🇺🇸 English transcription using local OpenAI Whisper
- 🇮🇳 Hindi/Hinglish transcription using Sarvam AI
- ✂️ Automatic audio chunking for long recordings
- 📝 AI-generated summaries
- 🏷️ Automatic title generation
- 📋 Extract key insights from videos
- 🧠 RAG-based conversational question answering
- 📚 ChromaDB vector database for semantic retrieval
- 🤖 Mistral AI powered summarization and chat
- 🌐 Interactive Streamlit web interface
- 💻 CLI version included
- ⚡ Fast environment management using uv
YouTube URL / Local File
│
▼
Audio Extraction
│
▼
Audio Chunking
│
▼
Speech-to-Text
┌────────────────────┐
│ Whisper (English) │
│ Sarvam (Hindi) │
└────────────────────┘
│
▼
Transcript
│
▼
Text Chunking
│
▼
Sentence Transformers
│
▼
ChromaDB
│
▼
Mistral AI
│
▼
Summary + RAG Chat
This project uses RAG to allow users to ask questions directly from video content.
- Video/audio is transcribed into text.
- Transcript is split into chunks.
- Chunks are converted into embeddings using Sentence Transformers.
- Embeddings are stored in ChromaDB.
- User asks a question.
- Relevant transcript chunks are retrieved.
- Retrieved context is sent to Mistral AI.
- Mistral generates a grounded response.
- Reduces hallucinations
- Improves factual accuracy
- Enables semantic search
- Provides context-aware responses
- OpenAI Whisper (Local)
Default model:
WHISPER_MODEL=smallRuns locally without external API calls.
- Sarvam AI Speech-to-Text API
Sarvam transcribes Hindi/Hinglish audio and translates it into English for downstream processing.
- Mistral AI
Used for:
- Title generation
- Summary generation
- Question answering
- RAG responses
- LangChain
- ChromaDB
- Sentence Transformers
- Streamlit
- yt-dlp
- FFmpeg
- pydub
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"curl -LsSf https://astral.sh/uv/install.sh | shVerify installation:
uv --versiongit clone <your-repository-url>
cd AI-Video-Assistantuv venvActivate:
venv\Scripts\activatesource venv/bin/activateuv pip install -r requirements.txtFFmpeg is required for audio extraction and processing.
- Download FFmpeg from:
https://ffmpeg.org/download.html
-
Extract the archive.
-
Add the
binfolder to your PATH. -
Verify installation:
ffmpeg -versionCreate a .env file in the project root:
MISTRAL_API_KEY=your_mistral_api_key
SARVAM_API_KEY=your_sarvam_api_key
Launch the web application:
streamlit run app.pyOpen:
http://localhost:8501
Run:
python main.pyYou will be prompted:
Enter YouTube URL or local file path:
Language (english/hinglish):
Example:
Enter YouTube URL or local file path:
https://youtu.be/example
Language:
english
Paste a YouTube URL or provide a local file path.
Choose:
- english → Whisper
- hinglish → Sarvam AI
Click Analyse.
The application performs:
- Audio Extraction
- Audio Chunking
- Speech-to-Text
- Transcript Generation
- Embedding Creation
- Vector Store Creation
- Summary Generation
- RAG Initialization
After processing, the system generates:
- Session Title
- Transcript Summary
- Key Insights
Ask questions directly from the transcript.
Example:
What are the key points discussed in this video?
The system retrieves relevant transcript chunks and generates grounded answers using Mistral AI.
AI-Video-Assistant/
│
├── app.py
├── main.py
├── requirements.txt
├── .env
│
├── core/
│ ├── transcriber.py
│ ├── summarizer.py
│ ├── rag_engine.py
│ └── vector_store.py
│
├── utils/
│ └── audio_processor.py
│
├── vector_db/
│
└── screenshots/
├── home.png
├── pipeline-running.png
├── summary.png
└── rag-chat.png
| Language | Engine |
|---|---|
| English | OpenAI Whisper (Local) |
| Hindi | Sarvam AI |
| Hinglish | Sarvam AI |
- User enters a YouTube URL or local file path.
- Audio is extracted.
- Audio is chunked.
- Transcription is performed.
- Transcript is generated.
- Transcript is embedded.
- Embeddings are stored in ChromaDB.
- Mistral AI generates a title and summary.
- RAG pipeline is created.
- User can chat with the transcript.
Ensure:
SARVAM_API_KEY=your_key_hereexists in the .env file.
Verify:
ffmpeg -versionreturns a valid version.
Install Node.js:
node -vThis improves YouTube extraction compatibility.
Whisper runs locally.
For faster inference:
WHISPER_MODEL=tiny- Speaker diarization
- PDF export
- Meeting minutes generation
- Timestamp search
- Multi-language support
- Real-time meeting transcription
- Cloud deployment
- Authentication
- Chat history