SpectralAudioWatermarker<T>
Models & Types · AiDotNet.Safety.Watermarking
Keyed patchwork audio watermark: the key splits each frame’s 0.5-6 kHz block-DCT coefficients into two halves, raises the magnitudes of one and lowers those of the other, and detection tests the log-magnitude difference.
Inheritance: ModelBase<T, Vector<T>, Vector<T>> → SafetyModuleBase<T> → AudioSafetyModuleBase<T> → AudioWatermarkerBase<T> → SpectralAudioWatermarker<T>
For Beginners
the key picks half of the frequencies in every short slice of audio; the watermark makes those slightly louder and the others slightly quieter. Nobody can hear a change this small, but with the key you can measure that “your” half is consistently louder.
How It Works
This is the patchwork scheme (Bender et al. 1996) in the DCT domain, as in the modified patchwork algorithm of Yeo and Kim (2003), with a keyed split per frame. Embedding multiplies every band coefficient by exp(beta x_k), beta = 0.3 x strength, where x_k is the key’s +/-1 pattern: a change of about +/-1.3 dB at the default strength. Unlike additive spread spectrum, the change is proportional to each coefficient, so it never adds energy where the audio has none.
Detection takes the log-magnitudes of the band (floored at 1e-3 of the band RMS), standardises them by their median and robust spread, clips them to +/-3, centres them, and correlates with the key’s pattern: the patchwork statistic “mean of half A minus mean of half B” with a variance that holds for any audio, so z is near N(0, 1) without the mark.
References:
- Bender, Gruhl, Morimoto, Lu. Techniques for Data Hiding (IBM Systems Journal, 1996)
- Yeo, Kim. Modified Patchwork Algorithm: A Novel Audio Watermarking Scheme (IEEE TSAP, 2003)
Constructors
| Constructor | Summary |
|---|---|
SpectralAudioWatermarker(double watermarkStrength) |
Preserves the original constructor signature using the default configuration. |
SpectralAudioWatermarker(double watermarkStrength, string key) |
Initializes a new patchwork audio watermarker. |
Properties
| Property | Summary |
|---|---|
string ModuleName { get; } |