Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CallSentry AI 🎯

HCL GUVI Hackathon 2026 — Track 3: Call Center Compliance

Intelligent call center analytics API that processes MP3 voice recordings in Hindi (Hinglish) and Tamil (Tanglish), performs multi-stage AI analysis, and returns structured compliance and business intelligence data.


🚀 Features

  • End-to-end audio processing pipeline (MP3 → insights)
  • Supports Hinglish (Hindi+English) and Tanglish (Tamil+English)
  • SOP compliance validation (5-step strict evaluation)
  • Sentiment analysis and business insights extraction
  • Robust JSON validation and fallback handling
  • Multi-key Gemini rotation to prevent API failure
  • Production-ready FastAPI deployment

Tech Stack

Layer Technology
Framework FastAPI (Python, async)
Speech-to-Text Groq Whisper Large v3
NLP / LLM Google Gemini 1.5 Flash
Rate Limit Handling Multi-key rotation
Deployment Render
Auth API Key via x-api-key header

Setup Instructions

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/callsentry-ai
cd callsentry-ai

2. Install dependencies

pip install -r requirements.txt

3. Set environment variables

cp .env.example .env

Edit .env — add your GROQ_API_KEY and GEMINI keys

Do NOT change API_KEY

4. Run

uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload

API Reference

Endpoint: POST /api/call-analytics

Headers:

  • Content-Type: application/json
  • x-api-key: sk_track3_987654321

Request Body:

{
  "language": "Tamil",
  "audioFormat": "mp3",
  "audioBase64": "<base64-encoded MP3>"
}

Response:

{
  "status": "success",
  "language": "Tamil",
  "transcript": "Full transcript of the call...",
  "summary": "Agent from GUVI discussed Data Science course with customer...",
  "sop_validation": {
    "greeting": true,
    "identification": false,
    "problemStatement": true,
    "solutionOffering": true,
    "closing": true,
    "complianceScore": 0.8,
    "adherenceStatus": "NOT_FOLLOWED",
    "explanation": "Agent did not confirm customer identity. All other steps were followed."
  },
  "analytics": {
    "paymentPreference": "EMI",
    "rejectionReason": "NONE",
    "sentiment": "Positive"
  },
  "keywords": ["GUVI", "Data Science", "EMI", "IIT Madras", "HCL", "Placement", "Course Fee", "Resume"]
}

Approach

  • Groq Whisper Large v3 — Speech-to-text optimized for Hinglish/Tanglish with domain prompts
  • Gemini 1.5 Flash — Structured JSON NLP in a single pass
  • Multi-key rotation — Handles rate limits and quota exhaustion
  • Python validation layer — Ensures strict schema compliance
  • Retry handling — Prevents malformed JSON failures

Architecture Overview

User/Judge
│
▼
POST /api/call-analytics
│
├── Auth Check (x-api-key header)
│
├── Base64 Decode → MP3 bytes
│
├── Groq Whisper Large v3
│     └── Speech-to-Text (Hinglish/Tanglish)
│
├── Gemini 1.5 Flash (with 5-key rotation)
│     └── Single-pass JSON NLP:
│           ├── Summary
│           ├── SOP Validation (5 stages)
│           ├── Analytics (payment/rejection/sentiment)
│           └── Keywords
│
├── Python Validator
│     ├── complianceScore = true_count / 5
│     ├── adherenceStatus enforced
│     └── All enums normalized
│
└── JSON Response → Judge

Known Limitations

  • Supports MP3 format only
  • Limited to Hindi (Hinglish) and Tamil (Tanglish)
  • Gemini free-tier rate limits apply (mitigated with 5-key rotation)
  • Render free tier may sleep after inactivity (mitigated with UptimeRobot)

AI Tools Used

Tool Purpose
Claude (Anthropic) Architecture design, code generation, prompt engineering, debugging
Google Gemini 1.5 Flash NLP analysis — summarization, SOP validation, classification, keywords
Groq Whisper Large v3 Speech-to-text transcription for Hinglish and Tanglish audio

About

Intelligent call center compliance API — Speech-to-Text (Hinglish/Tanglish) + SOP validation + payment analytics using Groq Whisper & Gemini

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages