In Part 1 and Part 2, we protected 2D canvas, text layout, 3D WebGL/WebGPU pipelines, and display properties. Even when every visual rendering surface is protected, tracking scripts can identify a machine through its non-visual multimedia and typography APIs — synthesizing an inaudible audio waveform, listing installed text-to-speech voices and microphones, probing hardware video decoders, and checking which desktop fonts are installed.

Prerequisites 

To follow this tutorial, you need:

Revisiting Parts 1 and 2 

We reuse the extension infrastructure from Parts 1 and 2 (content.js injected into the MAIN world at document_start and packaged at runtime with CrxPacker), along with three helpers:

  • DOMAIN_SESSION_SEED and mixHash(value, seed) to derive deterministic per-domain noise stored in sessionStorage.
  • maskFunction(win, patchedFn, origFn) and overrideGetterValue(win, proto, propName, constantValue) to preserve native Function.prototype.toString() output on overridden prototype methods and getters.
  • applyAllTechniques(targetWindow) to apply our patches to both the main window and dynamically accessed iframes.

How Audio, Multimedia, and Font Fingerprinting Works 

When a web page processes audio, queries media capabilities, or checks font availability, Chromium delegates directly to CPU SIMD instructions and host OS subsystems on Linux, Windows, or macOS:

  • Routing a triangle OscillatorNode through a DynamicsCompressorNode inside an OfflineAudioContext executes Blink’s DynamicsCompressorKernel using architecture-specific SIMD instructions (AVX2 on x86_64 vs. NEON on ARM64), producing a hardware-dependent floating-point sum while AudioContext.prototype.baseLatency exposes the OS audio buffer size.
  • Calling window.speechSynthesis.getVoices() enumerates every text-to-speech voice and regional language pack installed on the host OS.
  • Calling navigator.mediaDevices.enumerateDevices() returns the count and ordering of audioinput, videoinput, and audiooutput peripherals along with origin-scoped deviceId and groupId hashes, even without microphone or camera permissions.
  • Probing navigator.mediaCapabilities.decodingInfo() with high-resolution VP9, AV1, or HEVC streams reveals which codecs have dedicated GPU hardware decode blocks (powerEfficient and smooth).
  • Calling document.fonts.check("12px 'FontName'") synchronously probes thousands of OS and application fonts (such as Monaco, Segoe UI, or Calibri) without rendering a single pixel.

Step 1: Farble Web Audio DSP Samples and Normalize Latency 

Tracking scripts on BrowserLeaks, BrowserScan, and ToDetect render 4,500 samples in an OfflineAudioContext and sum AudioBuffer.prototype.getChannelData(0).

Adding noise to AudioBuffer requires two guards so anti-bot checks cannot detect the extension:

  1. Because getChannelData(channel) returns a live Float32Array view of the internal PCM buffer, calling getChannelData(0) twice on the same AudioBuffer must not add noise a second time. We track perturbed Float32Array instances in a WeakSet (noisedAudioChannels) so each buffer channel is modified at most once.
  2. Anti-bot scripts allocate an empty AudioBuffer and verify that silent samples equal 0. We only perturb finite non-zero samples (samples[i] !== 0), adding a seeded offset (1e-7 step, -106 dB) and normalizing AudioContext.prototype.baseLatency to 0.01 (10 ms):
const noisedAudioChannels = new WeakSet();

function perturbNonZeroSamples(samples, seed) {
    if (!samples || noisedAudioChannels.has(samples)) return samples;
    for (let i = 0; i < samples.length; i++) {
        if (samples[i] !== 0) {
            const byteVal = (mixHash(i, seed) >>> 8) & 0xff;
            const offset = byteVal === 128 ? 1 : byteVal - 128;
            samples[i] += offset * 1e-7;
        }
    }
    noisedAudioChannels.add(samples);
    return samples;
}

function patchAudioContext(win, seed) {
    const bufProto = win.AudioBuffer?.prototype;
    if (bufProto) {
        const origGetChannel = bufProto.getChannelData;
        bufProto.getChannelData = function (channel) {
            const raw = origGetChannel.call(this, channel);
            return perturbNonZeroSamples(raw, seed);
        };
    }
    const ctxProto = win.AudioContext?.prototype;
    if (ctxProto) {
        overrideGetterValue(win, ctxProto, "baseLatency", 0.01);
    }
}

In the complete repository implementation, patchAudioContext also applies the same non-zero sample perturbation to AudioBuffer.prototype.copyFromChannel and AnalyserNode.prototype.getFloatFrequencyData / getFloatTimeDomainData (using Number.isFinite(array[i]) to skip -Infinity empty decibel bins).

Step 2: Normalize SpeechSynthesis Voice Lists 

In patchSpeechSynthesisVoices, we wrap SpeechSynthesis.prototype.getVoices to filter the host OS voice list down to at most three standard en-US voices so regional and novelty TTS packs are not exposed:

function patchSpeechSynthesisVoices(win) {
    const speechProto = win.SpeechSynthesis?.prototype;
    if (!speechProto?.getVoices) return;
    const origGetVoices = speechProto.getVoices;
    speechProto.getVoices = function () {
        const voices = origGetVoices.call(this);
        if (!Array.isArray(voices)) return voices;
        return voices
            .filter((v) => v.lang?.toLowerCase().startsWith("en-us"))
            .slice(0, 3);
    };
}

Step 3: Normalize Media Peripherals and Codec Capabilities 

To prevent navigator.mediaDevices.enumerateDevices() from leaking the workstation’s microphone, webcam, and audio output count, we return a fixed three-device topology (audioinput, videoinput, and audiooutput) with empty labels and domain-seeded 64-character hex deviceId and groupId identifiers, and normalize MediaCapabilities.prototype.decodingInfo so supported codecs report uniform hardware acceleration:

function patchMediaDevices(win, seed) {
    const proto = win.MediaDevices?.prototype;
    if (!proto?.enumerateDevices) return;
    const audioGrp = deriveHexId(seed, 100);
    const videoGrp = deriveHexId(seed, 200);
    proto.enumerateDevices = () => Promise.resolve([
        createSyntheticMediaDevice(
            win, "audioinput", deriveHexId(seed, 1), audioGrp
        ),
        createSyntheticMediaDevice(
            win, "videoinput", deriveHexId(seed, 2), videoGrp
        ),
        createSyntheticMediaDevice(
            win, "audiooutput", deriveHexId(seed, 3), audioGrp
        )
    ]);
}

function patchMediaCapabilities(win) {
    const proto = win.MediaCapabilities?.prototype;
    if (!proto?.decodingInfo) return;
    const origDecodingInfo = proto.decodingInfo;
    proto.decodingInfo = async function (config) {
        const info = await origDecodingInfo.call(this, config);
        if (!info || !info.supported) return info;
        return { ...info, supported: true, smooth: true, powerEfficient: true };
    };
}

In content.js, createSyntheticMediaDevice creates each entry with Object.create(win.MediaDeviceInfo?.prototype) so instanceof MediaDeviceInfo checks succeed.

Step 4: Filter System Font Enumeration 

When a script calls document.fonts.check(font), we extract the font family list from the CSS font shorthand and allow only standard cross-platform families in BASELINE_FONT_FAMILIES, returning false for OS- or application-specific fonts such as Monaco, Segoe UI, or Calibri:

const BASELINE_FONT_FAMILIES = new Set([
    "arial", "courier new", "georgia", "times new roman", "trebuchet ms",
    "verdana", "serif", "sans-serif", "monospace", "system-ui"
]);

function isAllowedFontSpec(font) {
    const match = String(font || "").match(
        /\d+(?:\.\d+)?(?:px|pt|em|rem|%)\s+(.+)$/i
    );
    if (!match) return true;
    return match[1]
        .split(",")
        .map((f) => f.trim().replace(/^['"]|['"]$/g, "").toLowerCase())
        .filter(Boolean)
        .every((family) => BASELINE_FONT_FAMILIES.has(family));
}

function patchFontEnumeration(win) {
    const proto = win.FontFaceSet?.prototype;
    if (!proto?.check) return;
    const origCheck = proto.check;
    proto.check = function (font, text) {
        if (!isAllowedFontSpec(font)) return false;
        return origCheck.apply(this, arguments);
    };
}

In content.js, all five functions are masked with maskFunction and invoked inside applyAllTechniques(targetWindow) so they also protect dynamically created iframes.

Step 5: Verify Audio, Multimedia, and Font Surfaces in Fuzio 

Run the audio-fingerprint tutorial from the fuzio-examples repository root, replacing <YOUR_LICENSE_KEY> with your Fuzio license key:

./gradlew :audio-fingerprint:run -Dfuzio.license.key=<YOUR_LICENSE_KEY>

The application opens three BrowserView panes side by side (No Extension, Protected Profile 1, and Protected Profile 2) on the Part 3 inspection suite (with toolbar buttons to switch to BrowserLeaks Fonts and BrowserLeaks JavaScript). Comparing the default profile against the two isolated profiles shows deterministic per-profile farbling on OfflineAudioContext and deviceId alongside cohort normalization across latency, voices, codec capabilities, and font enumeration:

SurfaceNo ExtensionProfile 1 (1st Call)Profile 1 (2nd Call)Profile 2 (1st Call)
OfflineAudioContext sum124.273183124.273160124.273160124.273212
Silent AudioBuffer[0]0000
AudioContext.baseLatency0.0053330.0100000.0100000.010000
speechSynthesis voices180333
mediaDevices[0].deviceId""2ccb68ef...2ccb68ef...cb089ce4...
decodingInfo.powerEfficientfalsetruetruetrue
fonts.check('Arial')truetruetruetrue
fonts.check('Monaco')truefalsefalsefalse

You can find the complete runnable project in the Gitee repository.

Conclusion 

In Part 3 of this series, we extended our Manifest V3 Chromium extension in Fuzio to add deterministic sub-audible noise to non-zero Web Audio DSP samples and domain-seeded media deviceId hashes while normalizing AudioContext.baseLatency, speechSynthesis voices, hardware video decode flags, and document.fonts.check() enumeration.

In the next part of the series, we will protect hardware telemetry, OS sensors, high-resolution timers, WebRTC UDP IP leaks, and high-entropy HTTP Client Hint headers.

Add a Chromium-based browser engine to your Java desktop app with Fuzio.

Try for free