-
Project Setup
- Initialized git repository (main branch)
- Created professional project structure
- Set up virtual environment (
untv) - Configured
.gitignorefor Python project
-
Architecture & Documentation
- Comprehensive ARCHITECTURE.md with full technical specification
- Cost analysis showing 79% savings ($450 → $96/month)
- Database schema design (Cosmos DB + Azure AI Search)
- Processing workflow documentation
- README with installation instructions
-
Data Models (backend/models/session.py)
SessionMetadata- UN session informationTranscript- Full transcript with segmentsTranscriptSegment- Individual speaker segments with timestampsEntityExtraction- Extracted entities (speakers, countries, SDGs, etc.)Speaker- Speaker informationSDGReference- SDG mentions with contextChat- Chat session modelChatMessage- Individual chat messagesVectorSegment- Vectorized segments for semantic searchProcessingProgress- Real-time progress tracking
-
Core Services
-
UNTVScraper (backend/services/untv_scraper.py)
- Extract Kaltura Entry ID from URL
- Scrape session metadata (title, date, duration, location, etc.)
- Parse broadcasting entity, languages, categories
- Extract session type and description
-
AzureOpenAIClient (backend/services/azure_openai_client.py)
- Transcription with speaker diarization (GPT-4o-transcribe-diarize)
- Entity extraction using GPT-4o with structured output
- Executive summary generation
- Embedding generation (batch processing)
- RAG-powered chat completion
-
-
Configuration (config/settings.py)
- Pydantic-based settings with environment variable loading
- Azure OpenAI configuration (all 5 models)
- Azure Speech Services configuration
- Database settings (Cosmos DB, Blob Storage, AI Search)
- Processing limits and parameters
- Logging configuration
- Installing Python dependencies (Python 3.13 compatible versions)
-
Audio Processing Service
- Download video/audio from UN WebTV
- Extract audio track
- Upload to Azure Blob Storage (temporary)
-
Azure Resources Setup
- Create Cosmos DB database and containers
- Set up Azure Blob Storage containers
- Configure Azure AI Search index with vector search
-
Entity Extraction Pipeline
- Implement speakers identification
- Extract countries, organizations, treaties
- Identify SDG references
- Extract topics and key decisions
-
Vector Database Integration
- Generate embeddings for transcript segments
- Store in Azure AI Search
- Implement semantic search
-
FastAPI Backend
- Session processing endpoint (POST /sessions)
- Session retrieval endpoint (GET /sessions/{id})
- Chat endpoint (POST /sessions/{id}/chat)
- Catalog endpoint (GET /sessions)
- Export endpoints
-
Streamlit Frontend
- Session upload page with URL input
- Real-time progress tracking
- Session catalog with search/filter
- Chat interface with RAG
- Export buttons (transcript, chat)
- Premium Version First: Start with full-featured version, then optimize for cost
- Two-Database Approach: Cosmos DB (metadata) + Azure AI Search (vectors)
- Speaker Diarization: Use GPT-4o-transcribe-diarize for best quality
- Structured Output: Single GPT-4o call with JSON mode for entity extraction
- Async Processing: FastAPI async endpoints for concurrent operations
- Session Deduplication: Check database before processing to save costs
Current Target: ~$250-450/month (premium version) Optimized Target: ~$96/month (79% savings)
Key Optimizations Available:
- PostgreSQL + pgvector instead of Azure AI Search (-$60-75/month)
- Whisper instead of GPT-4o-transcribe (-$50-175/month)
- GPT-4o-mini for entity extraction (-$15-75/month)
- Smaller embedding model (-$5-15/month)
- Language: Python 3.13
- Framework: FastAPI + Streamlit
- AI Services: Azure OpenAI (5 models configured)
- Databases: Azure Cosmos DB, Azure AI Search
- Storage: Azure Blob Storage
- Video Processing: yt-dlp, pydub, ffmpeg
- Version Control: Git
db74b0b- Initial project setup: architecture, models, and scraper
- Processing time per session: < 15 minutes
- Chat response time: < 5 seconds
- Cost per session: < $7 (premium) or < $2 (optimized)
- Session reuse rate: > 40%
Project Status: Foundation complete, ready for implementation phase Estimated Completion: Phase 1 MVP in 2-3 weeks