How nabilmohamed99/callcenter_calls_analysis works
Project Type and Purpose
• This is a containerized, full-stack “Call Center QA” pipeline that runs entirely on CPU.
• Purpose: ingest WAV files (either seeded or uploaded interactively), store them in MongoDB GridFS, run a multi-stage ML pipeline (VAD, transcription + diarization, quality scoring & insights using Gemini 1.5 Pro), then present results via a Streamlit GUI.
Top-Level Components
a. Ingestion Layer
• 01_seed_callhome.py / 01_seed_callhome_darija.py: one-shot scripts to seed sample calls into MongoDB GridFS
• Streamlit upload widget (app.py/app_final_safe.py): interactive user uploads
b. Storage Layer
• MongoDB + GridFS (defined in docker-compose.yml) holds raw audio blobs and resulting metadata (transcripts, scores, summaries)
c. Pipeline Orchestrator
• src/graph.py: defines the DAG of processing steps
• src/supervisor.py: boots the pipeline, watches for new audio, schedules tasks
d. Processing Nodes (src/nodes/*)
1. ingest.py → pulls raw audio from GridFS, hands off to VAD
2. vad_diar_role.py → Whisper-base VAD segmentation (agent vs. client)
3. audio_one_to_txt.json & score_analyst.py → Gemini 1.5 Pro for transcription, diarization, scoring, summaries, sentiment curves
4. sink.py → writes back transcripts, scores, insights to MongoDB
e. GUI Layer
• Streamlit app (app.py / app_final_safe.py)
• Syncs an audio player + waveform display with transcript, score, insights
Key Architectural Patterns & Principles
• Modular, pluggable pipeline: each node is an independent Python module under src/nodes
• Orchestrator + DAG separation (graph.py vs supervisor.py) follows dataflow architecture
• All services containerized (Dockerfile + docker-compose), enabling zero-config deployment
• CPU-only ML inference, no external cloud dependencies beyond local Gemini model
Technologies & Frameworks
• Python 3.x, Streamlit (UI)
• MongoDB + GridFS (storage)
• Whisper-base for VAD
• Gemini 1.5 Pro for transcription & evaluation
• Docker & Docker Compose (deployment)