Release your hands, master knowledge with dialogue. Your AI Podcast Co-pilot.
PodMap is a Web-based AI Podcast Knowledge Workbench that transforms linear audio streams into structured interactive mind maps. It enables hands-free interaction through voice commands and supports active learning using the "Feynman Technique" (explaining concepts in your own words).
PodMap interface showing the episode list, interactive knowledge graph, transcript with audio player, and AI co-pilot for Q&A.
- Features
- Architecture
- User Stories & Implementation
- Tech Stack
- Getting Started
- Project Structure
- API Documentation
- Development
- Content Ingestion: Import podcasts from YouTube URLs or local audio files
- Automatic Transcription: AI-powered speech-to-text with word-level timestamps
- Knowledge Graph Extraction: Automatically generate interactive mind maps from transcripts
- Chapter Generation: Semantic segmentation of episodes into navigable chapters
- Voice Interaction: Push-to-talk voice commands for navigation, note-taking, and Q&A
- Interactive Playback: Waveform visualization with click-to-seek navigation
- Feynman Notes: Create and attach notes to concept nodes using voice or text
- Contextual Q&A: Ask questions about episode content using RAG (Retrieval-Augmented Generation)
PodMap follows a three-tier architecture with clear separation between frontend, backend API, and processing services.
┌─────────────────────────────────────────────────────────────────────────────┐
│ FRONTEND (React + TypeScript) │
│ ┌──────────────┐ ┌─────────────────────┐ ┌──────────────────────────┐ │
│ │ ChapterList │ │ Workspace │ │ CoPilotStream │ │
│ │ │ │ ┌───────────────┐ │ │ - Chat Interface │ │
│ │ - Episodes │ │ │ KnowledgeGraph│ │ │ - Q&A Answers │ │
│ │ - Chapters │ │ │ (ReactFlow) │ │ │ - Voice Results │ │
│ │ - Navigation│ │ └───────────────┘ │ └──────────────────────────┘ │
│ └──────────────┘ │ ┌───────────────┐ │ │
│ │ │Waveform Player│ │ │
│ │ │ (Wavesurfer) │ │ │
│ │ └───────────────┘ │ │
│ └─────────────────────┘ │
│ ┌─────────────────────┐ │
│ │ VoiceBar (WebSocket)│ │
│ │ - Push-to-Talk │ │
│ │ - Real-time STT │ │
│ └─────────────────────┘ │
└──────────────────────────────┬──────────────────────────────────────────────┘
│ HTTP REST API
│ WebSocket (ws://)
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ BACKEND API (FastAPI) │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ API Endpoints │ │
│ │ /api/v1/ingest - Episode ingestion │ │
│ │ /api/v1/episodes/* - Episode management │ │
│ │ /api/v1/audio/* - Audio playback & waveforms │ │
│ │ /api/v1/episodes/{id}/transcribe - Transcription │ │
│ │ /api/v1/episodes/{id}/graph - Knowledge graph │ │
│ │ /api/v1/episodes/{id}/chapters - Chapter generation │ │
│ │ /api/v1/chat - Text-based Q&A │ │
│ │ /api/v1/ws/voice - WebSocket voice commands │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────┬──────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────────────────┐ ┌──────────────┐ ┌──────────────────────┐
│ Processing Services │ │ Voice Service│ │ Storage Layer │
│ │ │ │ │ │
│ ┌────────────────┐ │ │ ┌──────────┐ │ │ ┌────────────────┐ │
│ │ Ingestion │ │ │ │ Intent │ │ │ │ SQLite DB │ │
│ │ - downloader │ │ │ │ Router │ │ │ │ - Episodes │ │
│ │ - importer │ │ │ │ (LLM) │ │ │ │ - Transcripts │ │
│ └────────────────┘ │ │ └──────────┘ │ │ │ - Nodes/Edges │ │
│ │ │ ┌──────────┐ │ │ │ - Notes │ │
│ ┌────────────────┐ │ │ │ Command │ │ │ │ - Chapters │ │
│ │ Audio │ │ │ │ Executor │ │ │ └────────────────┘ │
│ │ - normalization│ │ │ └──────────┘ │ │ ┌────────────────┐ │
│ │ - waveform │ │ │ ┌──────────┐ │ │ │ ChromaDB │ │
│ │ - vad │ │ │ │ WebSocket│ │ │ │ (Vector Store)│ │
│ └────────────────┘ │ │ │ Manager │ │ │ └────────────────┘ │
│ │ │ └──────────┘ │ │ ┌────────────────┐ │
│ ┌────────────────┐ │ └──────────────┘ │ │ Media Files │ │
│ │ AI Services │ │ │ │ (Audio Cache) │ │
│ │ - transcription│ │ │ └────────────────┘ │
│ │ - diarization │ │ │ │
│ └────────────────┘ │ └────────────────────┘
│ │
│ ┌────────────────┐ │
│ │ Brain Services│ │
│ │ - graph_extract│ │
│ │ - chapterization││
│ │ - rag │ │
│ │ - vector_store │ │
│ └────────────────┘ │
└──────────────────────┘
┌─────────────┐
│ User Input │ (YouTube URL or Local File)
└──────┬──────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 1. INGESTION PHASE │
│ POST /api/v1/ingest │
│ ├─ Create Episode record (status: "pending") │
│ ├─ Create Job record (job_type: "download") │
│ └─ Background Task: download_media() │
│ └─ yt-dlp → Download audio → media/{id}.mp3 │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 2. NORMALIZATION PHASE │
│ Background Task: run_normalization_job() │
│ ├─ FFmpeg: Convert to 16kHz mono WAV │
│ ├─ Save as processed_filename │
│ └─ Update Episode status: "downloaded" │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 3. TRANSCRIPTION PHASE │
│ POST /api/v1/episodes/{id}/transcribe │
│ Background Task: run_transcription_job() │
│ ├─ Whisper: Speech-to-Text │
│ ├─ Extract segments with timestamps │
│ ├─ Save to Transcript table │
│ └─ Store embeddings in ChromaDB │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 4. KNOWLEDGE EXTRACTION PHASE │
│ POST /api/v1/episodes/{id}/graph │
│ Background Task: run_graph_extraction_job() │
│ ├─ LLM: Extract hierarchical tree structure │
│ ├─ Create MindMapNode records │
│ ├─ Create MindMapEdge records │
│ └─ Map nodes to timestamps │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 5. CHAPTERIZATION PHASE │
│ POST /api/v1/episodes/{id}/chapters │
│ Background Task: run_chapterization_job() │
│ ├─ LLM: Semantic segmentation │
│ ├─ Generate chapter titles & summaries │
│ └─ Save to Chapter table │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 6. READY FOR INTERACTION │
│ Episode status: "completed" │
│ ├─ Knowledge graph available │
│ ├─ Chapters available │
│ ├─ Transcript available │
│ └─ Vector embeddings ready for RAG │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ CLIENT (Browser) │
│ User holds Fn key → Microphone activates │
│ ├─ Audio chunks sent via WebSocket (AUDIO_CHUNK) │
│ └─ On release → Send TRANSCRIBE message │
└──────┬──────────────────────────────────────────────────────────┘
│ WebSocket (ws://api/v1/ws/voice)
▼
┌─────────────────────────────────────────────────────────────────┐
│ SERVER: WebSocket Manager │
│ ├─ Buffer audio chunks │
│ ├─ On TRANSCRIBE: Call Whisper (client-side or server-side) │
│ └─ Receive transcript text │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ INTENT ROUTER (services/voice/intent_router.py) │
│ ├─ LLM Classification: │
│ │ - NAVIGATION: "go back 30 seconds", "pause", etc. │
│ │ - NOTE: "note that...", "I think...", etc. │
│ │ - QUESTION: "what is...", "explain...", etc. │
│ └─ Extract structured data (time offsets, content, etc.) │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ COMMAND EXECUTOR (services/voice/command_executor.py) │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ NAVIGATION │ │ NOTE │ │ QUESTION │ │
│ │ │ │ │ │ │ │
│ │ - Parse time │ │ - Save to DB │ │ - RAG Query │ │
│ │ - Send COMMAND│ │ - Link to node│ │ - LLM Answer │ │
│ │ via WS │ │ - Semantic │ │ - Return with│ │
│ │ │ │ matching │ │ sources │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└──────┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ RESPONSE │
│ Server → Client: RESULT message via WebSocket │
│ Client updates UI: │
│ - Navigation: Seek audio player │
│ - Note: Display in graph node │
│ - Question: Display answer in CoPilot panel │
└─────────────────────────────────────────────────────────────────┘
As a user, I want to import a podcast episode from YouTube so I can analyze it in PodMap.
- User opens PodMap interface
- User clicks "Import" and pastes a YouTube URL
- User sees a loading indicator showing processing status
- Episode appears in the library when ready
Frontend:
- Component:
ChapterListcomponent (frontend/src/components/panels/ChapterList.tsx) - API Call:
POST /api/v1/ingestviaapi.ingestEpisode()infrontend/src/lib/api.ts
Backend:
-
Endpoint:
POST /api/v1/ingestinbackend/api/v1/endpoints/ingest.py- Creates
Episoderecord with status "pending" - Creates
Jobrecord with job_type "download" - Triggers background task:
download_media()
- Creates
-
Service:
backend/services/ingestion/downloader.py- Uses
yt-dlpto download audio from YouTube - Saves to
media/{video_id}.mp3 - Updates Episode with title, duration, and filename
- Triggers normalization job automatically
- Uses
-
Database Models:
backend/models.pyEpisode: Stores episode metadata (title, source_url, status, duration, etc.)Job: Tracks background processing jobs (status, progress, error_message)
As a user, I want to say "go back 30 seconds" so I can re-listen to a part I missed without using my hands.
- User is listening to an episode
- User holds Fn key (push-to-talk)
- User says: "go back 30 seconds"
- Audio player automatically seeks backward by 30 seconds
Frontend:
-
Hook:
useVoiceWebSocket(frontend/src/hooks/useVoiceWebSocket.ts)- Handles WebSocket connection to
/api/v1/ws/voice - Manages push-to-talk state (microphone button or Ctrl key)
- Sends audio chunks as
AUDIO_CHUNKmessages - On release, sends
TRANSCRIBEmessage - Receives
COMMANDmessages and executes them (e.g., seek audio)
- Handles WebSocket connection to
-
Voice Bar Component: Displays recording state and transcript feedback
Backend:
-
WebSocket Endpoint:
GET /api/v1/ws/voiceinbackend/api/v1/endpoints/voice.py- Accepts WebSocket connections
- Uses
WebSocketManagerto handle connections and state
-
WebSocket Manager:
backend/services/voice/websocket_manager.py- Buffers incoming audio chunks
- Calls
process_voice_input()when transcript is ready - Sends
COMMANDmessages back to client
-
Intent Router:
backend/services/voice/intent_router.py- Uses Groq LLM to classify intent:
NAVIGATION,NOTE, orQUESTION - For navigation, extracts structured data:
{ "intent": "NAVIGATION", "data": { "action": "seek", "time_offset": -30.0 # negative = backward } }
- Uses Groq LLM to classify intent:
-
Command Executor:
backend/services/voice/command_executor.pyexecute_navigation_command()function- Parses time offset from intent data
- Sends
COMMANDmessage to client via WebSocket:{ "type": "COMMAND", "action": "seek", "time": current_time + time_offset }
-
Frontend Execution:
useVoiceWebSockethook receives COMMAND and calls the seek function on the audio player
As a user, I want to explain a concept in my own words and have it saved as a note attached to the relevant concept node in the mind map.
- User is listening to an episode about "Transformer Architecture"
- User hears about "Attention Mechanism"
- User holds Fn key and says: "I think attention is like focusing on specific parts of the input when generating each output token"
- System saves the note and attaches it to the "Attention" node in the knowledge graph
- User sees the note icon (📝) appear on the node
Frontend:
- Voice Input: Same
useVoiceWebSockethook sends audio and transcript - Graph Display:
KnowledgeGraphcomponent (frontend/src/components/workspace/KnowledgeGraph.tsx)- Fetches notes for each node:
GET /api/v1/episodes/{id}/notes?node_id={node_id} - Displays notes inline within node content
- Shows note count badge on nodes with notes
- Fetches notes for each node:
Backend:
-
Intent Classification:
classify_intent()identifies intent asNOTE{ "intent": "NOTE", "data": { "content": "I think attention is like focusing..." } } -
Command Executor:
execute_note_command()incommand_executor.py- Saves note to database: Creates
Noterecord with:episode_id: Current episodecontent: User's explanationtimestamp: Current playback time
- Semantic matching: Uses
_find_nearest_graph_node()- Gets transcript context around current timestamp
- Compares note content with all graph node labels using embeddings
- Finds most semantically similar node
- Sets
associated_node_idon the Note record
- Returns saved note with node association
- Saves note to database: Creates
-
API Endpoint:
GET /api/v1/episodes/{id}/notesinbackend/api/v1/endpoints/episodes.py- Returns all notes for an episode, optionally filtered by node_id
-
Database Model:
Noteinbackend/models.py- Links to
episode_idand optionalassociated_node_id(MindMapNode)
- Links to
As a user, I want to ask "What is the difference between RAG and Long Context?" and get an answer based on the podcast transcript.
- User is listening to an episode discussing RAG and Long Context
- User holds Fn key and asks: "What is the difference between RAG and Long Context?"
- System pauses playback (optional)
- System displays an answer card in the CoPilot panel with:
- Answer text
- Confidence score
- Source transcript segments with timestamps
Frontend:
-
CoPilot Stream:
CoPilotStreamcomponent (frontend/src/components/panels/CoPilotStream.tsx)- Displays Q&A cards with answers and sources
- Shows confidence scores
- Allows clicking on sources to seek to that timestamp
-
Voice Input:
useVoiceWebSocketsends question via voice or text input
Backend:
-
Intent Classification:
classify_intent()identifies intent asQUESTION{ "intent": "QUESTION", "data": { "question": "What is the difference between RAG and Long Context?" } } -
Command Executor:
execute_question_command()incommand_executor.py- Calls RAG service:
answer_question_with_rag()fromservices/brain/rag.py
- Calls RAG service:
-
RAG Service:
backend/services/brain/rag.py- Vector Retrieval:
- Uses
VectorStoreservice to query ChromaDB - Embeds question using sentence transformers
- Retrieves top-k similar transcript segments (semantic search)
- Uses
- Answer Generation:
- Constructs prompt with:
- User's question
- Retrieved transcript context
- System instructions for answering
- Calls Groq LLM (Llama 3.3 70B) to generate answer
- Returns answer with:
answer: Generated textsources: List of transcript segments with timestampsconfidence: Confidence score (0.0-1.0)
- Constructs prompt with:
- Vector Retrieval:
-
Vector Store:
backend/services/brain/vector_store.py- Manages ChromaDB collection for episode transcripts
- Stores embeddings of transcript segments
- Provides semantic search functionality
-
Database: Transcript segments stored in
Transcripttable (segments_jsonfield)- Each segment has:
start,end,text
- Each segment has:
As a user, I want to see a visual representation of key concepts from the episode and click on nodes to jump to relevant sections.
- User opens a processed episode
- User sees an interactive knowledge graph in the center workspace
- User clicks on a node labeled "Transformer Architecture"
- Audio player automatically seeks to the timestamp where that concept is discussed
Frontend:
-
Knowledge Graph Component:
KnowledgeGraph.tsx- Uses ReactFlow (
@xyflow/react) for graph visualization - Fetches graph data:
GET /api/v1/episodes/{id}/graph - Renders nodes and edges with hierarchical layout
- Implements click handlers:
onNodeClick()→ callsonSeekToTime(node.start_time)
- Uses ReactFlow (
-
Graph Data Structure:
{ nodes: [ { id: "transformer", label: "Transformer Architecture", start_time: 120.5, ... } ], edges: [ { source: "transformer", target: "attention", ... } ] }
Backend:
-
Graph Extraction:
backend/services/brain/graph_extractor.pyextract_graph_from_transcript()function- Uses Groq LLM with specialized prompt to extract hierarchical tree structure
- Creates tree: Root node → Branches → Sub-branches (no cycles)
map_nodes_to_timestamps(): Matches node labels to transcript segments- Finds first occurrence of key words in transcript
- Sets
start_timeandend_timeon nodes
-
API Endpoint:
GET /api/v1/episodes/{id}/graphinbackend/api/v1/endpoints/brain.py- Queries
MindMapNodeandMindMapEdgetables - Returns JSON structure for frontend
- Queries
-
Database Models:
MindMapNodeandMindMapEdgeinbackend/models.py- Nodes:
id(string),label,type,start_time,end_time - Edges:
source,target,relation_type
- Nodes:
-
Graph Generation Job: Triggered via
POST /api/v1/episodes/{id}/graph- Background task:
run_graph_extraction_job() - Runs after transcription is complete
- Stores nodes and edges in database
- Background task:
As a user, I want to see automatically generated chapters and click on one to jump to that section.
- User opens an episode
- User sees a list of chapters in the left panel (e.g., "00:00 Introduction", "05:30 Scaling Laws")
- User clicks on "Scaling Laws"
- Audio player seeks to 05:30
Frontend:
- Chapter List Component:
ChapterList.tsx- Fetches chapters:
GET /api/v1/episodes/{id}/chapters - Renders chapter list with titles and timestamps
- Click handler:
onChapterClick()→ callsonSeekToTime(chapter.start_time)
- Fetches chapters:
Backend:
-
Chapter Generation:
backend/services/brain/chapterization.pygenerate_chapters()function- Uses Groq LLM to analyze transcript and identify topic boundaries
- Generates chapter titles and summaries
- Returns list of chapters with
start_time,end_time,title,summary
-
API Endpoint:
GET /api/v1/episodes/{id}/chaptersinbackend/api/v1/endpoints/brain.py- Queries
Chaptertable - Returns sorted list of chapters
- Queries
-
Database Model:
Chapterinbackend/models.py- Fields:
title,start_time,end_time,summary
- Fields:
-
Chapter Generation Job: Triggered via
POST /api/v1/episodes/{id}/chapters- Background task:
run_chapterization_job() - Runs after transcription is complete
- Background task:
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool and dev server
- Tailwind CSS 4 - Styling
- ReactFlow (@xyflow/react) - Knowledge graph visualization
- Wavesurfer.js - Audio waveform visualization and playback
- WebSocket API - Real-time voice interaction
- FastAPI - REST API framework
- Python 3.11+ - Programming language
- SQLModel - ORM (SQLite database)
- Uvicorn - ASGI server
- WebSockets - Real-time bidirectional communication
- OpenAI Whisper (faster-whisper) - Speech-to-text transcription
- Groq (Llama 3.3 70B) - LLM for intent classification, graph extraction, Q&A, chapterization
- LangChain - LLM orchestration framework
- Sentence Transformers - Text embeddings
- ChromaDB - Vector database for semantic search
- FFmpeg - Audio normalization and format conversion
- PyAnnote Audio - Speaker diarization (optional)
- yt-dlp - YouTube audio download
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- Nginx - Reverse proxy and static file serving
- Docker and Docker Compose (recommended)
- OR: Python 3.11+, Node.js 18+, FFmpeg
- API Keys:
GROQ_API_KEY- For LLM services (required)OPENAI_API_KEY- For Whisper transcription (optional, uses local model by default)HUGGINGFACE_TOKEN- For speaker diarization (optional)
-
Clone the repository
git clone <repository-url> cd PodMap
-
Set up environment variables
cp backend/.env.example backend/.env # If exists # Edit backend/.env and add your API keys
-
Build and run with Docker Compose
docker-compose up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Set environment variables
export GROQ_API_KEY=your_key_here
export OPENAI_API_KEY=your_key_here # Optional
# Initialize database
python -c "from core.database import create_db_and_tables; create_db_and_tables()"
# Run server
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run devPodMap/
├── backend/
│ ├── api/
│ │ └── v1/
│ │ └── endpoints/ # API route handlers
│ │ ├── ingest.py # Episode ingestion
│ │ ├── episodes.py # Episode management
│ │ ├── audio.py # Audio playback
│ │ ├── transcription.py # Transcription jobs
│ │ ├── brain.py # Graph, chapters, RAG
│ │ ├── chat.py # Text Q&A
│ │ └── voice.py # WebSocket voice endpoint
│ ├── core/
│ │ └── database.py # Database setup
│ ├── models.py # SQLModel data models
│ ├── services/
│ │ ├── ingestion/ # YouTube download, file import
│ │ ├── audio/ # Normalization, waveform, VAD
│ │ ├── ai/ # Transcription, diarization
│ │ ├── brain/ # Graph extraction, RAG, chapters
│ │ ├── llm/ # Groq LLM client
│ │ └── voice/ # Voice command processing
│ ├── media/ # Audio files storage
│ ├── chroma_db/ # Vector database
│ ├── tests/ # Test suite
│ └── main.py # FastAPI app entry point
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── panels/ # ChapterList, CoPilotStream
│ │ │ └── workspace/ # KnowledgeGraph, WaveformPlayer
│ │ ├── hooks/
│ │ │ └── useVoiceWebSocket.ts # Voice interaction
│ │ ├── lib/
│ │ │ └── api.ts # API client
│ │ └── App.tsx # Main app component
│ └── package.json
│
├── docker-compose.yml
├── Dockerfile
└── README.md
POST /api/v1/ingest- Import episode from URLGET /api/v1/episodes- List all episodesGET /api/v1/episodes/{id}- Get episode detailsDELETE /api/v1/episodes/{id}- Delete episode
POST /api/v1/episodes/{id}/transcribe- Start transcriptionPOST /api/v1/episodes/{id}/graph- Generate knowledge graphPOST /api/v1/episodes/{id}/chapters- Generate chapters
GET /api/v1/audio/{episode_id}/waveform- Get waveform dataGET /media/{filename}- Stream audio file
GET /api/v1/ws/voice- WebSocket endpoint for voice commandsPOST /api/v1/chat- Text-based Q&AGET /api/v1/episodes/{id}/notes- Get notes
Full API documentation available at /docs when the backend is running.
cd backend
pytest- Python: Follow PEP 8, use type hints
- TypeScript: Use ESLint configuration
- Frontend: Use Prettier for formatting (if configured)
- Backend: Add service in
services/, create endpoint inapi/v1/endpoints/ - Frontend: Add component in
components/, update API client inlib/api.ts - Database: Add model in
models.py, update schema migration if needed
[Add your license here]
- Built with FastAPI
- Audio processing with FFmpeg
- Transcription with OpenAI Whisper
- LLM services powered by Groq
