AI call analytics
The clinic was losing patients and nobody knew why. AI analyzed 25,000 front-desk calls and showed where people drop off.
- Python
- GigaAM
- Gemma 4
- Qwen
- Claude Opus
- Firebird
- FFmpeg
Patient numbers at the clinic were falling. The only way to book an appointment was by phone, so the answer had to be somewhere in the front-desk calls: what people ask for, what they get turned down for, how they are spoken to. Nobody had the time to listen to thousands of conversations.
Management set the task: find the cause.
A pipeline that listens to every call and sorts it out on its own. The recordings never leave the clinic: speech recognition and the core analysis run on the clinic's own hardware.
Collection
The call archive is exported from the cloud PBX to local storage, and every call joins a queue.
Audio prep
FFmpeg brings all recordings to one format. In stereo recordings the operator and the patient are on separate channels: I split them and align the words on a shared timeline to restore the question-and-answer flow of the conversation.
Speech recognition
GigaAM, a model trained on Russian speech, runs in parallel on three GPUs.
Text repair
Bad lines and unclear speech cause recognition errors. A local Gemma 4 model fixes them and, in mono recordings, also separates the operator's lines from the patient's.
Analysis
Personal data is stripped from the text. Then a local Qwen model breaks each call down into 36 parameters: why the person called, what they were offered, how the call ended, the tone — and what matters for this particular clinic.
Reports
A report builder where staff chain the steps themselves: database query → model processing → new query → final summary. Claude Opus writes the summary from anonymized data. A new report needs no developer.
The hard parts
Volume
4,000–6,000 calls a month — 90–130 hours of conversation. The pipeline works in batches, and every call moves through stages with its own status in the database, so after a stop, processing resumes exactly where it left off.
Doubtful cases go to a human
Empty recordings, bad audio and model answers that fail validation go to a separate queue. I built a web view for it: transcript, audio and the model's findings side by side; a person makes the call.
Patient data
Only anonymized data ever reaches the cloud model.
- Pythonthe whole pipeline, queue and reports.
- GigaAMRussian speech recognition on our own GPUs.
- Gemma 4, Qwenlocal language models: text repair and call analysis against a JSON schema.
- Claude Opus via OpenRouterfinal summaries from anonymized data.
- Firebirdqueue, statuses, transcripts and analysis results. The recordings themselves are not stored in the database.
More than 25,000 calls analyzed in six months. For the first time the director saw what patients actually ask for, where they get turned away and how the front desk handles conversations — and got a detailed report on lost patients.
Just listening to these recordings would have taken a person about 70 working days — with no breaks and no notes.