Deepmark

Vigil Audio Watermarking SDK

Overview

The Vigil SDK is a C/C++ library for real-time audio watermark embedding and detection. It uses a deep learning watermarking model to imperceptibly embed a digital watermark into audio streams, and a corresponding detector to verify whether a given audio signal contains the watermark.

Key capabilities

  1. Real-time streaming embedding — process audio step-by-step, suitable for live audio pipelines
  2. Offline and real-time detection — analyze audio in chunks or as a full buffer to determine whether a watermark is present
  3. Cross-language support — C API available for integration with Python, Rust, Unity, and other languages
  4. Performance tuning — built-in thread tuner to find the optimal configuration for your hardware

Audio Format

Before passing audio to the SDK, ensure that it has been loaded and resampled to the required sample rate. The SDK processes raw audio buffers only and does not handle file I/O or format conversion.

The SDK expects audio input as mono float32 samples. The required sample rate depends on the model being used.

How It Works

The embedder takes an audio stream as input and produces a new audio stream with an inaudible watermark embedded in it.

The detector takes an audio signal and determines whether it contains a watermark, returning a confidence score and a binary decision.

Getting Started

#include <vigil/vigil.h>

// --- Embedding ---
vigil::EmbedderConfig cfg;
cfg.model_path = "models/embedder.enc";

vigil::StreamingEmbedder embedder(cfg);
embedder.Load();

float output[512];
size_t out_count = 0;
while (has_more_audio) {
    embedder.EmbedStep(next_512_samples, 512, output, &out_count);
    // Use the first out_count samples from output
}

// --- Detection ---
vigil::DetectorConfig dcfg;
dcfg.model_path = "models/detector.enc";

vigil::Detector detector(dcfg);
detector.Load();

vigil::DetectResult result;
detector.Detect(audio_buffer, num_samples, result);
// result.decision: 1 = watermarked, 0 = not watermarked