# kartik-tiwarir20/ai-video-summarizer architecture

> Architecture diagram of the GitHub repository kartik-tiwarir20/ai-video-summarizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kartik-tiwarir20/ai-video-summarizer
- Repository: https://github.com/kartik-tiwarir20/ai-video-summarizer

## Overview

This is an AI video and meeting assistant: users submit a YouTube URL or local audio/video, receive a transcript, title, summary, action items, decisions, and open questions, then ask transcript-grounded questions. The Streamlit interface calls the pipeline orchestrator, which sequences audio preparation, transcription, and analysis; retrieval supports chat. The README is empty. Edges reflect the supplied source excerpts and index; external model and service links are included only where dependencies or code support them.

Main entry points: [`main.py`](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/main.py) (Pipeline orchestrator), [`core/rag.py`](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/rag.py) (RAG chain), [`app.py`](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/app.py) (Streamlit interface), [`utils/audioprocessor.py`](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/utils/audioprocessor.py) (Audio acquisition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_streamlit["Streamlit interface<br/>[app.py]"]
  node_pipeline["Pipeline orchestrator<br/>[main.py]"]
end

subgraph group_media["Media ingestion"]
  node_audio_input["Audio acquisition<br/>[audioprocessor.py]"]
  node_audio_chunks["Audio conversion and chunking<br/>[audioprocessor.py]"]
end

subgraph group_analysis["Transcript analysis"]
  node_transcription["Chunk transcription<br/>[transcriber.py]"]
  node_title_summary["Title and summary<br/>[summarize.py]"]
  node_meeting_extracts["Meeting extracts<br/>[extractingq.py]"]
  node_retry["Retry utility<br/>[llm_utils.py]"]
end

subgraph group_retrieval["Retrieval and chat"]
  node_rag["RAG chain<br/>[rag.py]"]
  node_vector_store[("Transcript vector store<br/>[vector.py]")]
end

node_user(("User"))
node_youtube(("YouTube"))
node_whisper{{"Whisper model"}}
node_mistral{{"Mistral LLM"}}

node_user -->|"submits media"| node_streamlit
node_streamlit -->|"runs analysis"| node_pipeline
node_streamlit -->|"asks question"| node_rag
node_pipeline -->|"processes source"| node_audio_input
node_audio_input -->|"downloads audio"| node_youtube
node_audio_input -->|"converts or chunks"| node_audio_chunks
node_pipeline -->|"transcribes chunks"| node_transcription
node_transcription -->|"transcribes audio"| node_whisper
node_pipeline -->|"generates title and summary"| node_title_summary
node_pipeline -->|"extracts meeting details"| node_meeting_extracts
node_pipeline -->|"builds chat chain"| node_rag
node_title_summary -->|"generates text"| node_mistral
node_meeting_extracts -->|"extracts text"| node_mistral
node_rag -->|"builds retriever"| node_vector_store
node_rag -->|"answers questions"| node_mistral
node_title_summary -->|"uses retry"| node_retry
node_meeting_extracts -->|"uses retry"| node_retry
node_rag -->|"uses retry"| node_retry

click node_streamlit "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/app.py"
click node_pipeline "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/main.py"
click node_audio_input "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/utils/audioprocessor.py"
click node_audio_chunks "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/utils/audioprocessor.py"
click node_transcription "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/transcriber.py"
click node_title_summary "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/summarize.py"
click node_meeting_extracts "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/extractingq.py"
click node_retry "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/llm_utils.py"
click node_rag "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/rag.py"
click node_vector_store "https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/vector.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit,node_pipeline,node_user toneBlue
class node_audio_input,node_audio_chunks toneAmber
class node_transcription,node_title_summary,node_meeting_extracts,node_retry toneMint
class node_rag,node_vector_store toneRose
class node_youtube,node_whisper,node_mistral toneIndigo
```

## Components

### User interface

- [Streamlit interface](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/app.py): `app.py`
- [Pipeline orchestrator](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/main.py): `main.py`

### Media ingestion

- [Audio acquisition](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/utils/audioprocessor.py): `utils/audioprocessor.py`
- [Audio conversion and chunking](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/utils/audioprocessor.py): `utils/audioprocessor.py`

### Transcript analysis

- [Chunk transcription](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/transcriber.py): `core/transcriber.py`
- [Title and summary](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/summarize.py): `core/summarize.py`
- [Meeting extracts](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/extractingq.py): `core/extractingq.py`
- [Retry utility](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/llm_utils.py): `core/llm_utils.py`

### Retrieval and chat

- [RAG chain](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/rag.py): `core/rag.py`
- [Transcript vector store](https://github.com/kartik-tiwarir20/ai-video-summarizer/blob/main/core/vector.py): `core/vector.py`

### Other components

- **User**
- **YouTube**
- **Whisper model**
- **Mistral LLM**

## Connections

- User → Streamlit interface: submits media (evidence: `app.py`)
- Streamlit interface → Pipeline orchestrator: runs analysis (evidence: `app.py`)
- Streamlit interface → RAG chain: asks question (evidence: `app.py`)
- Pipeline orchestrator → Audio acquisition: processes source (evidence: `main.py`)
- Audio acquisition → YouTube: downloads audio (evidence: `utils/audioprocessor.py`)
- Audio acquisition → Audio conversion and chunking: converts or chunks (evidence: `utils/audioprocessor.py`)
- Pipeline orchestrator → Chunk transcription: transcribes chunks (evidence: `main.py`)
- Chunk transcription → Whisper model: transcribes audio (evidence: `core/transcriber.py`)
- Pipeline orchestrator → Title and summary: generates title and summary (evidence: `main.py`)
- Pipeline orchestrator → Meeting extracts: extracts meeting details (evidence: `main.py`)
- Pipeline orchestrator → RAG chain: builds chat chain (evidence: `main.py`)
- Title and summary → Mistral LLM: generates text (evidence: `core/summarize.py`)
- Meeting extracts → Mistral LLM: extracts text (evidence: `core/extractingq.py`)
- RAG chain → Transcript vector store: builds retriever (evidence: `core/rag.py`)
- RAG chain → Mistral LLM: answers questions (evidence: `core/rag.py`)
- Title and summary → Retry utility: uses retry (evidence: `core/summarize.py`)
- Meeting extracts → Retry utility: uses retry (evidence: `core/extractingq.py`)
- RAG chain → Retry utility: uses retry (evidence: `core/rag.py`)
