Watermarking Integration Guide
Add watermarking to existing Wake Word Application.
Watermark based media wake suppression must be explicitly enabled during engine initialization by:
-
Loading a Watermark config blob into memory and tracking a pointer to the memory and the sizeof the config blob loaded
char * loadedWatermarkConfigBlob; size_t sizeofLoadedWatermarkConfigBlob;
-
Defining and configuring an instance of
PryonLiteWatermarkConfig
which points to the prior loaded config blobPryonLiteWatermarkConfig watermarkConfig = PryonLiteWatermarkConfig_Default; watermarkConfig.config = loadedWatermarkConfigBlob; watermarkConfig.sizeofConfig = sizeofLoadedWatermarkConfigBlob;
-
Pointing to the configured
PryonLiteWatermarkConfig
instance from thePryonLiteV2Config
instance used to configure the engineengineConfig.watermark = &watermarkConfig;
Testing
A test watermark configuration binary (watermark.alexa+echo.bin) and matching sample audio files (alexa-watermark-media.##.wav) are found in the samples/watermarking folder. PryonLiteV2Config.watermark.config must be set to the memory address of the the test watermark configuration binary. Modify the sizeofConfig field to the size of the watermark configuration binary in bytes.
The audio can then be pushed to the PryonLite engine instance initialized above. The wake word in the sample audio file will be matched and suppressed and no wake word detection event happens.
Sample Wake Word Engine Application
A sample PryonLite engine application is included in the package. It can be run on the sample audio file and watermark configuration binary by preparing the audio file list with the samples/watermaring folder as per Prepare Input Audio List and using the below command..
For PRL1000:
PRL1000 does not support watermarking.
For PRL2000:
./<architecture>/amazon_filesim-PRL2000 -m models/<model_format>/D.en-US.alexa.bin samples/watermark/all_wavs.list -w samples/watermark/watermark.alexa+echo.bin