Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collection Call Audit Pipeline

Built during the Legal Hackathon — Swiss {ai} Weeks, September 2026.

Try the demo: https://lnkd.in/emUVwya3

Turns collection-call recordings into a compliance audit report.

The workflow below is one example of what the pipeline can do — it is a starting point that can be extended further.

The idea

The core idea of the project is a Data Minimizer: an AI assistant built around a privacy-first workflow. The tool that inspired it is ElevenLabs, which can be configured to comply with GDPR rules.

In our workflow:

  1. ElevenLabs converts the call audio into text (and separates who is speaking).
  2. We then apply a data minimization step in Python, using regular expressions (regex), to remove the sensitive data.
  3. Finally an agent — Claude, in this case — reads the minimized text and extracts the variables of interest, i.e. selects the information we need.
wf

Where it helps

  • Debt-collection calls (primary use case) — the agent must name the agency and the creditor, verify identity, and never disclose the debt to a family member.
  • Insurance & telemarketing sales calls — the same needs: the caller must identify themselves and the company, state the product terms, capture consent, and not mislead.

Same engine, different rules — easily adapted to banking, telco or healthcare calls.

Workflow

  1. Transcribe (pipeline/transcribe.py) — ElevenLabs Scribe with diarization, producing Agent/Operator: / Customer: turns. Uses detect_speaker_roles when available (scribe_v2); otherwise maps the first speaker to Agent/Operator.
  2. Mask (pipeline/masking.py) — masks the phone from the customer DB to 004176*98, mints a deterministic, non-reversible CUST-ANON-XXXX id, and redacts phone / full DOB / fiscal code / IBAN / email / customer name from the transcript before it reaches the model. This step is pure Python — no AI.
  3. Extract (pipeline/extraction.py) — an Anthropic tool-use call that returns strict YES/NO compliance flags + satisfaction, each with an evidence quote. The KPI is computed deterministically from the mandatory steps (not by the LLM). A no-API heuristic mode is also available for the demo (no key needed).
  4. Report (pipeline/report.py) — one row per call: Audit_Report.xlsx (colour-coded YES/NO and PASS/FAIL, plus an Evidence sheet) and Audit_Report.csv.

Examples of the audit variables

More variables can be added. These are some binary variables that help check compliance and determine the KPIs.

# Column Source Meaning
— ID Number Customer (original) DB real customer id (kept for internal join)
— Number (masked) DB + Stage 2 phone masked as 004176*98
— Customer ID (anon) Stage 2 deterministic CUST-ANON-XXXX
1 Presentation of Agency transcript agent identified the collection agency
2 Presentation of Company transcript agent named the creditor company
3 Name Ask transcript agent asked to confirm the customer's name
4 Date of Birth Ask transcript agent asked DOB for identity verification
5 Client Answer transcript person confirmed they are the debtor
6 Is Family Member transcript person reached is a third party / relative
7 Refuses to Provide Identity transcript person refused to identify themselves
8 Satisfaction transcript Positive / Neutral / Negative (+ 1–5 score)
9 KPI computed fraction of mandatory steps done → PASS/FAIL

Note on "10 audit variables": the original list had 11 items, but two of them (original id, masked number) come from the customer database, not the transcript. The pipeline produces all of them; the 9 above are the transcript-derived + computed audit variables, plus the 2 DB-joined fields.

The page has three ways to run:

  • Try the live demo — one click, no API keys. Runs two built-in sample calls and shows a PASS/FAIL report you can download. Ideal for a pitch.
  • Upload transcripts (.txt) — dialogues with Agent: / Customer: lines. No ElevenLabs needed; the file name starts with the customer id (10001_call.txt).
  • Upload audio (.mp3/.wav) — transcribed + speaker-split automatically (needs an ElevenLabs key, entered in the form or via the environment).

About

This project was created during the Legal Hackathon — Swiss {ai} Weeks (September 2026) as a proof of concept — a starting point that can be developed further.


Screening tool with human review — it flags calls for a person to confirm. Not legal advice; confirm GDPR and sector-specific rules with your compliance advisor.

About

AI tool that audits debt-collection and sales call recordings for compliance — it transcribes the call, hides personal data, and uses an AI agent to check the rules and produce a report for further KPIs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages