TranscriptionToxicityDetector<T>
Models & Types · AiDotNet.Safety.Audio
Detects toxic content in audio by analyzing acoustic features indicative of aggressive speech.
Inheritance: ModelBase<T, Vector<T>, Vector<T>> → SafetyModuleBase<T> → AudioSafetyModuleBase<T> → TranscriptionToxicityDetector<T>
For Beginners
While text-based toxicity detection catches harmful words, this module analyzes the sound itself — shouting, aggressive tone, and speech patterns associated with hateful content can be detected from audio features alone.
How It Works
This module analyzes acoustic features (energy, pitch variation, speaking rate) that correlate with aggressive or hateful speech patterns. It acts as an audio-level complement to text-based toxicity detection by catching patterns that transcription-based approaches might miss.
Detection approach:
- Energy analysis — sudden loud bursts can indicate shouting/aggression
- Speaking rate estimation — very rapid speech can correlate with agitation
- Dynamic range — extreme variation in volume may indicate emotional distress
- Short-term energy variance — high variance suggests shouting patterns
- Zero-crossing rate — correlates with voiced/unvoiced speech characteristics
References:
- Multimodal toxicity detection: combining audio + text signals (ACL 2024)
- Speech emotion recognition for content moderation (INTERSPEECH 2024)
- Hate speech detection in speech: challenges and approaches (2024)
- Acoustic correlates of aggression in speech (Journal of Phonetics, 2023)
Constructors
| Constructor | Summary |
|---|---|
TranscriptionToxicityDetector(double threshold, int defaultSampleRate) |
Initializes a new transcription toxicity detector. |
Properties
| Property | Summary |
|---|---|
string ModuleName { get; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<SafetyFinding> EvaluateAudio(Vector<T> audioSamples, int sampleRate) |