# Radio Ad Analysis: Why Whisper + GPT-4o-mini is a Brutal Combo

> Source: <https://promptcube3.com/en/threads/3043/>
> Published: 2026-07-25 03:47:43+00:00

# Radio Ad Analysis: Why Whisper + GPT-4o-mini is a Brutal Combo

The goal was to determine if ad density peaks at the top of the hour and if different stations run the same ads simultaneously. To do this, I needed a pipeline that could capture audio in parallel and classify it without manual labeling.

## The Technical Pipeline

The biggest challenge wasn't the AI, but the synchronization. If you record stations sequentially, you lose the ability to correlate events. I used a thread pool to trigger `ffmpeg`

captures across 11 different streams at the exact same millisecond.

Here is the core logic for the capture and transcription workflow:

1. **Parallel Capture:** I used `ffmpeg`

to pull 18-second chunks from live web streams, downsampling to 16kHz mono to keep the files small and compatible with Whisper.

```
# Example of the ffmpeg command used for sampling
ffmpeg -i "http://stream-url-here" -t 18 -ar 16000 -ac 1 output.wav
```

2. **Local Transcription:** I ran a local Whisper model (the ~500MB version from Hugging Face) to convert the WAV files to text. Doing this locally was non-negotiable to avoid massive API latency and costs for thousands of short clips.

3. **LLM Classification:** The resulting text snippets were passed to `gpt-4o-mini`

to categorize the content. I used a strict classification prompt to avoid "chatty" responses.

```
{
  "prompt": "Classify the following transcript as either 'AD', 'SONG', or 'TALK'. Return only the label.",
  "transcript": "[Transcription from Whisper]",
  "model": "gpt-4o-mini"
}
```

## The Diagnosis: Accuracy vs. Cost

I initially questioned if `gpt-4o-mini`

could distinguish between a high-energy song intro and a high-energy ad. After auditing a sample of 100 clips, the error rate was surprisingly low—mostly because the transcription of ads usually contains "call-to-action" keywords (e.g., "Call now," "Visit our website," "Limited time offer") that the LLM picks up instantly.

**Performance Metrics:**

**Whisper Latency:**~2 seconds per 18s clip on local hardware.** Classification Cost:**Negligible due to the mini model's pricing.** Sync Drift:**Less than 500ms across 11 parallel threads, which is acceptable for identifying synchronized ad blocks.

## Findings and Logic

The data confirmed my suspicion: ads are not distributed randomly. There is a massive spike in "AD" classifications at the top of the hour across multiple commercial stations. Even more interesting was the correlation—multiple stations frequently hitting an ad break at the exact same moment, sometimes even playing the same commercial.

The project proves that a "traditional" data science approach—sampling, timestamping, and analyzing distributions—is still incredibly powerful when you use AI as a feature extractor (Whisper for audio → text) and a classifier (GPT for text → category) rather than just a chatbot.

[Next LLM Gateway: Managing Multi-Model Chaos from Scratch →](/en/threads/3032/)
