← Back to tutorials

Audio Content Moderation: Implementation Guide

Detecting inappropriate content in audio with AI

Audio Content Moderation: Implementation Guide (2026)

Moderating audio (voice messages, calls, podcasts, voice-agent input) means catching harmful content — hate speech, threats, harassment, sexual content — in speech. The reliable pattern is transcribe, then moderate the text, optionally adding acoustic cues. This guide covers the pipeline and its limits.

The core pattern: transcribe → moderate

python
from openai import OpenAI
client = OpenAI()

with open("clip.mp3","rb") as f: text = client.audio.transcriptions.create(model="whisper-1", file=f).text

mod = client.moderations.create(model="omni-moderation-latest", input=text) flagged = mod.results[0].flagged categories = mod.results[0].categories # hate, harassment, sexual, violence, ...

Transcribe with Whisper (Multilingual ASR), then run the text through a moderation endpoint (OpenAI Moderations, or an LLM with a rubric for nuanced policies). This catches the content of speech reliably.

What text-only moderation misses

Some harm is in delivery, not words — aggressive tone, or audio that isn't speech (screaming, certain sounds). Add signals where it matters:

  • Acoustic/emotion cues for tone — see Audio Sentiment Analysis.
  • Per-speaker attribution in multi-party audio via diarization, so you moderate the right person.
  • Production design

  • Real-time vs batch. For voice agents, moderate streaming transcript chunks; for uploads, batch the whole file.
  • Human-in-the-loop for borderline cases — auto-block the clear violations, queue the ambiguous ones for review.
  • Log decisions with the transcript + categories for appeals and policy tuning.
  • Localize policies. Run moderation on the original language; Whisper transcribes many languages (see Whisper vs Deepgram).
  • FAQ

    Can I moderate audio directly? The practical route is transcribe → moderate text, plus acoustic cues for tone. Which moderation tool? OpenAI Moderations for standard categories; an LLM with a custom rubric for nuanced policies. Real-time? Yes — moderate streaming transcript chunks as they arrive. How to handle borderline cases? Auto-handle clear cases; route ambiguous ones to human review.

    Summary

    Audio moderation = transcribe with Whisper, then moderate the text with a moderation API or rubric-driven LLM, adding acoustic/emotion and diarization signals where tone or speaker matters. Auto-block clear violations, review borderline ones, and log every decision for appeals and tuning.


    *Last updated: June 2026. Verify APIs against the OpenAI moderation docs.*

    Also available in 中文.

    Audio Content Moderation: Implementation Guide | AI Skill Navigation | AI Skill Navigation