The Challenge: Automated Speech & Behavioral Intelligence
Evaluating technical interviews at scale is prone to cognitive fatigue and subjective bias. Candidates often articulate solutions while demonstrating hesitation markers, fillers, or topic drift that traditional resume screeners cannot capture.
We engineered an intelligent pipeline that ingests raw audio recordings, performs GPU-accelerated transcription, and analyzes multi-dimensional candidate performance through high-throughput LLM reasoning.
System Architecture Overview
The architecture operates across two decoupled phases coordinated by an asynchronous FastAPI gateway:
- Audio Ingestion & Chunking: Audio files (.mp3, .wav) are validated, resampled to 16kHz mono, and queued for transcription.
- Local Whisper Acceleration: OpenAI Whisper runs locally on GPU to generate verbatim transcripts alongside millisecond-precision timestamps and silence markers.
- Structured Reasoning via Groq: The timestamped transcript is dispatched to LLaMA 3.1 8B running on Groq LPU hardware, completing deep linguistic analysis in sub-second inference speeds.
- Deterministic JSON Formatting: Groq returns structured JSON containing dimensional scores (technical depth, clarity, confidence), pause frequency, and key topical milestones.
FastAPI Route Handler Implementation
Below is an extract of the async FastAPI endpoint demonstrating how audio streams are processed and forwarded to the evaluation model:
from fastapi import FastAPI, UploadFile, File, HTTPException
import whisper
import httpx
import os
app = FastAPI(title="Interview Intelligence API")
whisper_model = whisper.load_model("base.en", device="cuda")
@app.post("/api/v1/analyze-interview")
async def analyze_interview(file: UploadFile = File(...)):
if not file.filename.endswith(('.mp3', '.wav')):
raise HTTPException(status_code=400, detail="Invalid audio format")
temp_path = f"/tmp/{file.filename}"
with open(temp_path, "wb") as buffer:
buffer.write(await file.read())
# Local GPU Speech-to-Text
result = whisper_model.transcribe(temp_path, word_timestamps=True)
transcript_text = result["text"]
# Forward to Groq for structured evaluation
async with httpx.AsyncClient() as client:
groq_response = await client.post(
"https://api.groq.com/openai/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['GROQ_API_KEY']}"},
json={
"model": "llama-3.1-8b-instant",
"response_format": {"type": "json_object"},
"messages": [
{"role": "system", "content": "Extract candidate scores, sentiment, and timeline milestones."},
{"role": "user", "content": transcript_text}
]
}
)
return groq_response.json()Visualizing Insights on Next.js Frontend
On the client side, Next.js ingests the JSON payload to generate interactive radar charts for competencies, timeline scrubbing with playback synchronization, and confidence breakdown graphs.
This setup empowers hiring teams to review comprehensive candidate assessments with full auditability back to exact audio timestamps.
