---
title: "Transcribe call center recordings - pipeline with code"
description: "Split stereo calls by channel, cut speech turns, transcribe Arabic and English, redact PII and summarise each call with an LLM. A working Python pipeline with costs."
url: https://broadrouter.com/blog/transcribe-call-center-recordings/
lang: en
updated: 2026-11-14
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# How to transcribe call center recordings: an Arabic-ready pipeline

By the BroadNet Inference team · 4 min read · Published 2026-11-14

To transcribe call center recordings, split stereo files into agent and customer channels, cut each channel into speech turns, transcribe every turn with the right language code, then merge the turns by start time. Redact card numbers and phone numbers from the transcript before an LLM summarises the call. Mono recordings need a separate diarization step.

## Key takeaways

-   Most call recorders store agent and customer on separate stereo channels. Splitting them gives perfect speaker labels without diarization.
-   Cutting each channel at silences gives you turn order and skips paying for silence.
-   Normalise Eastern Arabic digits before redaction, or card and phone numbers slip through.
-   Redact the transcript before the summary step, and ask the LLM for structured JSON.
-   At $0.0042 a minute, 1,000 hours of Arabic speech cost $252.00 to transcribe.

**On this page**

1.  Step 1: is the recording stereo or mono?
2.  Step 2: how do you split stereo channels with ffmpeg?
3.  Step 3: how do you cut each channel into speech turns?
4.  Step 4: how do you transcribe each turn?
5.  Step 5: how do you merge turns into a dialogue?
6.  What about mono recordings?
7.  Step 6: how do you redact PII, Arabic digits included?
8.  Step 7: how do you summarise each call with an LLM?
9.  Which quality checks come before the analytics?
10.  What does call transcription cost?
11.  Where BroadNet Inference fits

_[image: A support agent with a headset beside a screen showing a call transcript, with the text "Every call becomes insight."]_

Illustration of an app you could build; not a BroadNet product screenshot.

A call centre produces thousands of hours of audio a month, and almost none of it gets read. Transcripts make calls searchable. Summaries make them reviewable. This post builds the pipeline end to end, with an Arabic angle: dialects, mixed Arabic and English, and Eastern Arabic digits.

The steps:

1.  Inspect the recording: stereo or mono?
2.  Split stereo into agent and customer channels.
3.  Cut each channel into speech turns.
4.  Transcribe each turn with the right language.
5.  Merge turns into a dialogue by start time.
6.  Redact PII from the text.
7.  Summarise with an LLM into structured fields.

## Step 1: is the recording stereo or mono?

```bash
ffprobe -v error -show_entries stream=channels,sample_rate,duration -of csv=p=0 call.wav
# 2,8000,412.6   -> stereo, 8 kHz telephone audio, 6.9 minutes
```

Many contact-centre recorders store the agent on one channel and the customer on the other. [AssemblyAI’s contact-centre guide](https://www.assemblyai.com/docs/contact-center-best-practices) makes the same point: with separate channels, you get speaker separation without diarization. Check which side is which on a few calls; it is not always left for the agent.

## Step 2: how do you split stereo channels with ffmpeg?

```bash
ffmpeg -i call.wav -af "pan=mono|c0=c0" -ar 16000 agent.wav
ffmpeg -i call.wav -af "pan=mono|c0=c1" -ar 16000 customer.wav
```

The `pan` filter keeps one channel, and `-ar 16000` resamples to 16 kHz, the format BroadNet’s docs use for phone recordings.

## Step 3: how do you cut each channel into speech turns?

This is a simple form of [voice activity detection](https://broadrouter.com/glossary/vad/). Sending each full channel works, but you pay for every second of silence while the other party talks, which roughly doubles the bill on a stereo call. It also loses turn order. Cutting at silences fixes both:

```python
import re, subprocess

def speech_turns(wav, noise="-35dB", min_silence=0.6):
    """Return (start, end) seconds of speech, using ffmpeg silencedetect."""
    log = subprocess.run(
        ["ffmpeg", "-i", wav, "-af", f"silencedetect=noise={noise}:d={min_silence}", "-f", "null", "-"],
        capture_output=True, text=True).stderr
    dur = float(subprocess.run(
        ["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "csv=p=0", wav],
        capture_output=True, text=True).stdout)
    starts = [float(x) for x in re.findall(r"silence_start: ([\d.]+)", log)]
    ends = [float(x) for x in re.findall(r"silence_end: ([\d.]+)", log)]
    turns, cursor = [], 0.0
    for s, e in zip(starts, ends + [dur]):
        if s - cursor > 0.4:
            turns.append((cursor, s))
        cursor = e
    if dur - cursor > 0.4:
        turns.append((cursor, dur))
    return turns
```

Tune `noise` on your own recordings: noisy lines need a higher threshold such as `-30dB`.

## Step 4: how do you transcribe each turn?

```python
import os, tempfile
from openai import OpenAI

client = OpenAI(base_url="https://inference.broadnet.ai/v1", api_key=os.environ["BROADNET_API_KEY"])

def transcribe_turns(wav, speaker, language="ar"):
    out = []
    for start, end in speech_turns(wav):
        with tempfile.NamedTemporaryFile(suffix=".wav") as seg:
            subprocess.run(["ffmpeg", "-y", "-loglevel", "error", "-i", wav,
                            "-ss", f"{start:.2f}", "-to", f"{end:.2f}", seg.name], check=True)
            with open(seg.name, "rb") as audio:
                text = client.audio.transcriptions.create(
                    model="broadnet/cohere-transcribe-arabic", file=audio, language=language).text
        out.append({"start": start, "speaker": speaker, "text": text.strip()})
    return out
```

Always send `language`. Without it, Arabic can come back in Latin letters. For English-language queues, use `broadnet/cohere-transcribe` with `language="en"`. Keep a small worker pool: pay-as-you-go keys allow 4 requests at once and 30 a minute, and the [errors and retries guide](https://broadrouter.com/guides/errors-and-retries/) shows how to back off on 429.

Single files must stay under 25 MiB. A long monologue at 16 kHz mono WAV (about 32 KB a second) passes that at around 13 minutes; split it with `-f segment -segment_time 600`.

## Step 5: how do you merge turns into a dialogue?

```python
turns = transcribe_turns("agent.wav", "Agent") + transcribe_turns("customer.wav", "Customer")
dialogue = "\n".join(f'{t["speaker"]}: {t["text"]}' for t in sorted(turns, key=lambda t: t["start"]))
```

Overlapping speech shows up as two turns with close start times, which is what a human reviewer expects.

## What about mono recordings?

Without channels you need **[speaker diarization](https://broadrouter.com/glossary/diarization/)**: deciding who spoke when. Options:

| Option | How | Trade-off |
| --- | --- | --- |
| Open-source diarization | Run [pyannote.audio](https://github.com/pyannote/pyannote-audio) on your servers, then transcribe each speaker segment | You host a model; audio stays with you |
| A provider with built-in diarization | Several STT APIs return speaker labels; see the [pricing comparison](https://broadrouter.com/blog/speech-to-text-api-pricing-compared/) for add-on costs | Another vendor in the data path |
| LLM role labelling | Transcribe turns, then ask an LLM to label each turn Agent or Customer from context | Cheap; wrong on short or ambiguous turns |
| Fix it at the source | Switch the recorder to dual-channel | Best long-term answer |

BroadNet does not list diarization, so on mono audio pair it with one of the first three options.

## Step 6: how do you redact PII, Arabic digits included?

Callers read card numbers, IBANs and phone numbers aloud. Transcripts may write them in Western digits (0-9) or Eastern Arabic digits (٠-٩). Normalise first, then redact:

```python
EASTERN = str.maketrans("٠١٢٣٤٥٦٧٨٩۰۱۲۳۴۵۶۷۸۹", "01234567890123456789")

def redact(text):
    text = text.translate(EASTERN)
    text = re.sub(r"\b(?:\d[ -]?){13,19}\b", "[CARD]", text)
    text = re.sub(r"\b[A-Z]{2}\d{2}[A-Z0-9]{11,30}\b", "[IBAN]", text)
    text = re.sub(r"\+?\d[\d -]{7,}\d", "[PHONE]", text)
    return text
```

Numbers can also be spoken as words (“خمسة أربعة…”), which regex will miss. Sample transcripts by hand and add rules for what you find. The wider approach is in [sending sensitive data to an LLM API](https://broadrouter.com/blog/llm-api-sensitive-data/).

## Step 7: how do you summarise each call with an LLM?

```python
import json
summary = client.chat.completions.create(
    model="broadnet/qwen3.8-27b",
    response_format={"type": "json_object"},
    messages=[
        {"role": "system", "content": "Summarise this call centre dialogue. Reply in English JSON with keys: "
                                      "reason, resolution, resolved (true/false), customer_sentiment, follow_up."},
        {"role": "user", "content": redact(dialogue)},
    ],
).choices[0].message.content
print(json.loads(summary))
```

Qwen3.8 27B supports [structured output](https://broadrouter.com/glossary/structured-output/); always parse and validate the reply ([how](https://broadrouter.com/blog/structured-output-json-schema/)). BroadNet’s own test also found it understands Gulf and Egyptian dialects. Ask for English JSON if your dashboards are in English, even when the call is in Arabic.

## Which quality checks come before the analytics?

Dashboards built on bad transcripts look just as confident as dashboards built on good ones. Add these checks to the pipeline:

-   **Channel swap.** If agent and customer labels are reversed on some recorder or queue, every “agent said” metric is wrong. Check the first turn: agents usually open with a greeting and a company name.
-   **Empty or tiny transcripts.** A turn that returns no text, or a call with under 20 words, usually means silence, hold music or a bad file. Flag it rather than summarising it.
-   **Language mismatch.** An English queue that suddenly produces Arabic text, or Arabic returned in Latin letters, points to a wrong `language` value.
-   **Summary drift.** Each week, have a supervisor compare 20 summaries with the full transcript. Track how often `resolved` is wrong.

Store the per-turn transcripts, not only the summary. When a summary is disputed, the turns are your evidence.

## What does call transcription cost?

With turn cutting, billed audio is close to talk time. For 1,000 hours of Arabic speech:

-   Transcription: $252.00 at $0.0042 a minute on [BroadNet Transcribe Arabic](https://broadrouter.com/models/cohere-transcribe-arabic/), or $120.00 on the 14-language [BroadNet Transcribe](https://broadrouter.com/models/cohere-transcribe/) for English queues.
-   Summaries: a 7-minute call is often a few thousand tokens. Price it in the [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/) with your real transcript lengths, and the audio side in the [speech-to-text cost calculator](https://broadrouter.com/tools/speech-to-text-cost-calculator/).

## Where BroadNet Inference fits

BroadNet covers steps 4 and 7 with one key and one [base URL](https://broadrouter.com/glossary/base-url/): Arabic and 13 other languages for transcription, and Arabic-tested chat models for the summary. Audio, transcripts and prompts are not retained ([zero data retention](https://broadrouter.com/zero-data-retention/)), and BroadNet reports its Arabic model #2 of 37 (its September 2026 figure; the live board listed it #4 of 39 on 15 November 2026) on the Open Universal Arabic ASR Leaderboard.

It does not do diarization, real-time transcription or redaction for you; those stay in your pipeline. Before you commit, test your dialects using the method in [Arabic dialect speech recognition](https://broadrouter.com/blog/arabic-dialect-speech-recognition/).

Free tools for this

-   [Arabic token counter](https://broadrouter.com/tools/arabic-token-counter/) Arabic vs English token counts per tokenizer: the "Arabic tax" in tokens and money.
-   [Arabic text normalizer](https://broadrouter.com/tools/arabic-text-normalizer/) Tashkeel, tatweel, alef, ya, ta marbuta, digits and invisible characters, with a matching Python function.
-   [Speech-to-text cost calculator](https://broadrouter.com/tools/speech-to-text-cost-calculator/) Hours, calls or voice notes to a monthly transcription bill, against your current provider.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[Speech-to-text](https://broadrouter.com/glossary/speech-to-text/)

Speech-to-text, also called automatic speech recognition (ASR), is technology that converts spoken audio into written text. A speech-to-text API accepts an audio file or stream and returns a transcript, usually priced per minute of audio. Accuracy is measured with word error rate and varies with accent, dialect and recording quality.

[Speaker diarization](https://broadrouter.com/glossary/diarization/)

Speaker diarization is the task of dividing an audio recording into segments by speaker, answering "who spoke when". It labels each stretch of speech with an anonymous speaker ID such as SPEAKER\_00, and is usually combined with a transcript to show which person said each line.

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[PII (personally identifiable information)](https://broadrouter.com/glossary/pii/)

PII (personally identifiable information) is information that can be used to distinguish or trace a person's identity, such as a name, ID number or biometric record, plus other information linked or linkable to that person. The GDPR's broader term is personal data. In LLM work, PII redaction removes it from prompts before they leave your systems.

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[Base URL](https://broadrouter.com/glossary/base-url/)

A base URL is the fixed root address of an API, such as https://api.example.com/v1, that a client puts in front of every endpoint path, such as /chat/completions. In OpenAI-compatible SDKs, changing the base URL, together with the API key and model ID, points the same code at a different provider.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

## Questions

### How do I separate agent and customer in a call recording?

If the recording is stereo, the agent and customer are usually on different channels. Split them with ffmpeg and transcribe each channel on its own. If it is mono, you need speaker diarization.

### Do I pay twice when I transcribe both stereo channels?

If you send each full channel, yes, because each channel is as long as the call. Cutting each channel into speech turns and sending only the turns brings the billed audio close to the actual talk time.

### Can I transcribe Arabic calls with English words mixed in?

Yes, but test it. Gulf and Levantine agents often switch to English for product names and numbers. Check how those words come out on 20 real calls before you rely on keyword search or analytics.

### Should I redact audio or text?

Redact the text transcript before it goes to an LLM, analytics or search. If you keep the audio, it still contains the spoken numbers, so restrict and expire the audio as well.

### How long can each audio file be?

BroadNet accepts WAV or MP3 up to 26,214,400 bytes (25 MiB) per request. 16 kHz mono WAV is about 32 KB a second, so keep segments under about 13 minutes, or use MP3.

## Keep reading

-   [Arabic meeting minutes from recordings: an API pipeline](https://broadrouter.com/blog/arabic-meeting-minutes-from-recordings/)
-   [Transcribe long audio over 25 MB: split, send and stitch](https://broadrouter.com/blog/transcribe-long-audio-files-api/)
-   [Arabic speech-to-text API: how to choose one in 2026](https://broadrouter.com/blog/arabic-speech-to-text-api-buyers-guide/)
-   [Sending sensitive data to an LLM API: redact, minimise, log less](https://broadrouter.com/blog/llm-api-sensitive-data/)
-   [Arabic dialect speech recognition: Gulf, Egyptian, Levantine, Maghrebi](https://broadrouter.com/blog/arabic-dialect-speech-recognition/)
-   [Speech-to-text API pricing compared: price per minute in 2026](https://broadrouter.com/blog/speech-to-text-api-pricing-compared/)
-   [Add diacritics to Arabic text with an LLM: prompt, checks, DER](https://broadrouter.com/blog/arabic-diacritization-llm/)
-   [Arabic grammar and spelling correction with an LLM: a how-to](https://broadrouter.com/blog/arabic-grammar-spelling-correction-llm/)
-   [Guide: Arabic speech-to-text API, step by step](https://broadrouter.com/guides/arabic-speech-to-text-api/)
-   [Guide: BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-transcribe-call-center-recordings&utm_content=page-cta) ·

**Sources**

-   [FFmpeg filters documentation (pan, silencedetect)](https://ffmpeg.org/ffmpeg-filters.html)
-   [AssemblyAI, contact center best practices (multichannel audio)](https://www.assemblyai.com/docs/contact-center-best-practices)
-   [pyannote.audio, open-source speaker diarization](https://github.com/pyannote/pyannote-audio)
-   [BroadNet Inference API reference, transcription and limits](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-transcribe-call-center-recordings&utm_content=sources)
-   [BroadNet Inference machine-readable prices (pricing.json)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-transcribe-call-center-recordings&utm_content=sources)
