perf: harden realtime localization pipeline
This commit is contained in:
@@ -109,6 +109,31 @@ test("WebGPU STFT packing이 microphone 주파수 응답을 bin별로 역보정
|
||||
});
|
||||
assertEqual(uncompensated[0], 0, "disabled compensation real");
|
||||
assertEqual(uncompensated[1], 2, "disabled compensation imaginary");
|
||||
|
||||
const notchedMicrophones = [{
|
||||
frequencyResponse: [
|
||||
{ frequencyHz: 0, gainDb: -120 },
|
||||
{ frequencyHz: 4000, gainDb: -120 },
|
||||
],
|
||||
}];
|
||||
const notched = {
|
||||
frameCount: 1,
|
||||
microphoneCount: 1,
|
||||
spectra: new Map([[8, { real: Float32Array.of(1), imaginary: Float32Array.of(0) }]]),
|
||||
};
|
||||
const limited = packStftBatch(notched, [8], {
|
||||
microphones: notchedMicrophones,
|
||||
sampleRate: 8000,
|
||||
fftSize: 256,
|
||||
});
|
||||
const explicitLegacyLimit = packStftBatch(notched, [8], {
|
||||
microphones: notchedMicrophones,
|
||||
sampleRate: 8000,
|
||||
fftSize: 256,
|
||||
maxCompensationDb: 120,
|
||||
});
|
||||
assertNear(limited[0], 10 ** (24 / 20), 1e-5, "default notch boost limit");
|
||||
assert(explicitLegacyLimit[0] > 999_000, "explicit 120 dB notch boost");
|
||||
});
|
||||
|
||||
test("WebGPU batch size가 storage, dispatch, memory 한도를 모두 지킨다", () => {
|
||||
|
||||
Reference in New Issue
Block a user