SouravTheBuilder/VideoQnA
VideoQnA: Ask Questions of a YouTube Video Locally
Turn any YouTube video into a searchable Q&A — no cloud needed, 100% open source + free.
What Is This?
VideoQnA is a demonstration project that lets you ask natural language questions about a YouTube video’s content, and (on your local machine) it will:
- Transcribe or fetch the video’s transcript,
- Break it into semantic chunks & embed them,
- Build a lightweight search index (FAISS),
- Retrieve relevant snippets for your query,
- Generate a grounded answer via a local small LLM, with timestamped citations.
It showcases a full transcript → search → Q&A pipeline using open-source tools. The entire system runs locally, no paid APIs required.
Why It Matters / What It Demonstrates
- Many videos have lengthy unsearchable transcripts — this shows how to turn them into interactive Q&A.
- Demonstrates knowledge of: ASR (speech-to-text), embeddings & semantic search, retrieval-augmented generation, prompt engineering, and local LLM orchestration.
- A clean, modular, reproducible codebase you can walk through in ~10 minutes.
Tech Stack & Design Highlights
How to Run (Quick Start)
- Clone the repo
git clone https://github.com/AgrawalSourav/VideoQnA.git
cd VideoQnA
2. **Install dependencies**pip install -r requirements.txt
- Run locally streamlit run src/app.py
First run will download Whisper and embedding models. You can use smaller models (like tiny or base) for faster performance.
🔗 Live demo example:
Features
- Full offline pipeline — no API keys or paid LLMs
- Semantic chunking (context-aware transcript segmentation)
- Local embedding + FAISS retrieval
- Real-time Q&A via Streamlit
- Supports any public YouTube video URL
- Works locally and on Hugging Face Spaces
Workflow Summary
Key Learnings
Future Improvements
🔹 Add caching for repeated URLs (Streamlit st.cache_data) 🔹 Display timestamps with retrieved chunks 🔹 Add history & export feature 🔹 Optionally integrate small local models (e.g., phi3 via Ollama) 🔹 Deploy also on Streamlit Cloud
TL;DR A fully local, open-source YouTube Transcript Q&A app — powered by Whisper, FAISS, SentenceTransformers, and Streamlit. Deployable on Hugging Face Spaces — zero cost, zero API keys.
