PerturbationVoiceProtector<T>

Models & Types · AiDotNet.Safety.Audio

Protects voice recordings against cloning by adding imperceptible adversarial perturbations.

Inheritance: ModelBase<T, Vector<T>, Vector<T>> → SafetyModuleBase<T> → AudioSafetyModuleBase<T> → PerturbationVoiceProtector<T>

For Beginners

This is like adding an invisible “anti-copying” pattern to a voice recording. Humans can’t hear the difference, but if someone tries to clone the voice using AI, the protection disrupts the cloning process. Think of it like a DRM for your voice.

How It Works

Adds carefully crafted perturbations to the audio that disrupt voice cloning systems while remaining inaudible to human listeners. The perturbations target the frequency bands most important for speaker embedding extraction (typically 300-3400 Hz for formants) and add noise shaped to psychoacoustic masking thresholds.

References:

  • SafeSpeech: SPEC perturbation framework against voice cloning (2025, arxiv:2504.09839)
  • Adversarial examples for speech recognition (Carlini & Wagner, 2018)
  • Voice protection via perturbation (2024)

Constructors

Constructor Summary
PerturbationVoiceProtector(double perturbationStrength, int sampleRate) Initializes a new perturbation-based voice protector.

Properties

Property Summary
string ModuleName { get; }

Methods

Method Summary
IReadOnlyList<SafetyFinding> EvaluateAudio(Vector<T> audioSamples, int sampleRate)
Vector<T> ProtectAudio(Vector<T> audioSamples, int sampleRate) Applies voice protection perturbations and returns protected audio with safety findings.