Skip to content

fix(media): whole-token generator signatures, context for common words (no more 'Udio' on Studio) - #35

Merged
ksanyok merged 1 commit into
mainfrom
fix/media-generator-token-match
Oct 27, 2026
Merged

ksanyok merged 1 commit into
mainfrom
fix/media-generator-token-match

Conversation

@ksanyok

@ksanyok ksanyok commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Problem

_scan_markers matched generator signatures as raw substrings of the lowercased metadata. Two kinds of human audio got "Generator signature: Udio (audio), high", risk 1.0:

  • files from DAWs named "… Studio" (FL Studio, Studio One, Sound Studio);
  • files with XMP audio fields such as xmpDM:audioSampleRate.

The PromoPilot audio watermark detector runs on this module and has been used about 1,200 times since 13.10, so users saw these wrong verdicts.

Fix

  • Every signature now matches only as a whole token: no letter or digit right before or after it.
  • Names that are also ordinary words need generator context as well: udio, suno, sora, pika, flux, runway, gemini, playground, firefly, imagen. The context can be any of:
    • a domain: suno.com, udio.com, pika.art;
    • "made / created / generated … with / by ";
    • <name> ai, a version (v4, 2), or FLUX.1-dev;
    • a vendor phrase: "OpenAI Sora", "Google Gemini", "Adobe Firefly", "Runway Gen-4", "Pika Labs", "Black Forest Labs";
    • for udio and suno only, a metadata value that is exactly the name. This keeps a RIFF ISFT "Suno" tag detected, as the existing test expects.
  • Distinctive names keep working with the token match alone: midjourney, elevenlabs, comfyui and the rest.

Tests

New tests in tests/test_media_watermark.py:

  • Not detected: "FL Studio 21", "Studio One 6", "Sound Studio", "xmpDM:audioSampleRate", "Runway Lights", "Firefly - demo take", "Influx mixdown", "Gemini Records", "Playground session", "Pikachu remix".
  • Still detected: "Made with Udio", "Udio", "https://suno.com/…", "Suno AI v4.5", "FLUX.1-dev", "OpenAI Sora", "Runway Gen-4", "ElevenLabs".

pytest tests/test_media_watermark.py tests/test_watermark.py: 30 passed.

Real files, run on the PromoPilot server:

Set Before After
23 human recordings from Wikimedia Commons, uploaded before 2022 2 flagged as Udio (h03.wav: RIFF "Sound Studio"; h13.mp3: xmpDM:audioSampleRate) 0 flagged
21 Suno samples 0 flagged by generator signature (they carry no text marker) 0 flagged

So no real generator detection is lost.

…xt for common words

Raw substring search turned 'Studio' (FL Studio, Studio One, Sound Studio) and
'xmpDM:audioSampleRate' into 'Generator signature: Udio, high' on human
recordings. On 23 human recordings from Wikimedia Commons (pre-2022) 2 were
flagged; with this change 0. Short or ordinary-word names (udio, suno, sora,
pika, flux, runway, gemini, playground, firefly, imagen) now also need generator
context: a domain, 'made with ...', '... ai', a version, a vendor name, or a
metadata value that is exactly the name (keeps RIFF ISFT 'Suno' detected).
@ksanyok
ksanyok merged commit a5ddbef into main Oct 27, 2026
16 checks passed
@ksanyok
ksanyok deleted the fix/media-generator-token-match branch October 27, 2026 12:22
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

Successfully merging this pull request may close these issues.

1 participant