Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watermark Detection Fails for Audio Files Modified by Online Tools #70

Open
adamhendo opened this issue Nov 26, 2024 · 1 comment
Open

Comments

@adamhendo
Copy link

Issue Description:

The watermark detection functionality fails when audio files are processed by certain online tools, such as audiotrimmer.com for speeding up or slowing down audio. Specifically:

Even when using the --detect-speed or --detect-speed-patient options, the watermark cannot be detected for files modified by such tools.
This issue does not occur when the same modifications (e.g., speed changes) are applied using tools like SoX. The watermark is successfully detected in these cases.
This behaviour suggests that the issue may not be with my build or configuration of the software, but rather a limitation in how the detection algorithm handles distortions introduced by online tools.

Steps to Reproduce:

Generate a watermarked audio file using the add command.
Upload the watermarked file to an online tool like audiotrimmer.com and apply a speed change (e.g., 1.1x or 0.9x).
Attempt to detect the watermark using the get command with --detect-speed or --detect-speed-patient.
Compare this behavior to a file modified by SoX with a similar speed adjustment. In this case, the watermark is detected.

Expected Behaviour:

The software should detect the watermark in files processed by online tools, similar to its performance on files processed locally using tools like SoX.

Actual Behavior:

The watermark detection fails for files processed by online tools, even with speed correction enabled.
Additional Information:

My build is working correctly, as evidenced by successful detection on SoX-modified files.
It appears that online tools may introduce additional distortions beyond simple speed changes (e.g., compression or re-encoding artifacts), which may interfere with the watermark detection.

@tim-janik
Copy link
Contributor

There is a huge difference in the sox speed 1.1 command (adjust the audio speed, i.e. pitch and tempo together) and what audiotrimmer.com/audio-speed-changer does. If you compare the output spectrum to the original, e.g. with sndfile-spectrogram, you will notice that after sox speed 1.1 the spectrum average is slightly shifted by ca 10%. If you listen to it, it still sounds good, but pitched slightly higher. That is the expected outcome if a sound file is played back at a higher speed.

In contrast, the spectrum average of the audiotrimmer.com/audio-speed-changer output is exactly the same, but a lot of additional noise is also present. If you listen to the result, you can notice significant "bubbeling" background noise, that is due to something like shifting lots of large grains into each other and cross-fading. In short, the audio quality is much worse than the original, and what was changed is really not the playback speed, but the total tempo by ways of cutting out or overlapping much of the original audio material.

This kind of modification, whether desirable or not in terms of playback quality, is not within the scope of the playback speed detector that audiowmark implements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants