kosta-pmf / dnn-audio-watermarking

DNN-based audio watermarking
GNU General Public License v3.0
41 stars 11 forks source link

DNN-audio-watermarking

We implemented a robust DNN-based audio watermarking system. It contains two neural networks. One for embedding the watermark (Embedder), and the other for detecting watermarks in watermarked audio signals (Detector).\ The system has been trained against following watermarking attacks:

This work has been published in the DSP Journal: https://www.sciencedirect.com/science/article/abs/pii/S1051200421004206.

You can use our pretrained models with the provided samples. For start, restore the embedder and the detector models:

from evaluation import restore_model
embedder = restore_model("embedder_model")
detector = restore_model("detector_model")

To test embedding process call:

import librosa
from main import embed
signal, sr = librosa.load('samples/example1.wav', sr=16000)
watermarked_signal = embed(embedder, signal)

To test detection call:

from main import detect
watermark = detect(detector, watermarked_signal)

To train your own model using this architecture, you can use provided functions stored in python files like models, train, etc.

Prerequisites