aarushg025/call-center-compliance
1
Call Center Compliance API
Description
A RESTful API built for Track 3 of the Compliance Hackathon. The API is designed to accept Base64-encoded audio directly from JSON payloads. It leverages a blazing-fast Multi-Stage AI Pipeline:
- ASR (Speech-to-Text): Faster-Whisper transcribes Hinglish/Tanglish seamlessly using PyAV audio manipulation.
- NLP & Data Extraction: Gemini 2.5 Flash / Llama 3.3 dynamically evaluate transcripts against specific SOP criteria. Using Pydantic Schema-enforced prompts, the LLM maps the conversational data precisely to required specific categorical enumerations (
EMI,BUDGET_CONSTRAINTS). - Semantic Indexing: ChromaDB indexes conversation transcripts and metadata for immediate downstream context retrieval and semantic relevance validation.
Tech Stack
- Language/Framework: Python 3.12, FastAPI
- Transcription Library: Faster-Whisper, PyAV
- Vector Database: ChromaDB
- LLM / AI Models: Google Gemini 2.5 Flash (Primary, structured JSON generation), Groq Llama-3.3-70b (Fallback robust NLP generation)
Setup Instructions
- Clone the repository:
git clone <your-repo-link>
cd your-repo- Install dependencies:
python -m venv .venv
# Activate Environment depending on OS
.venv\Scripts\activate
pip install -r requirements.txt- Set environment variables: Create a
.envfile matching.env.example:
API_SECRET_KEY=sk_track3_987654321
GEMINI_API_KEY=your_key
GROQ_API_KEY=your_key- Run the application:
uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload