feat: add independent full-band activity workflow

This commit is contained in:
2026-08-29 13:56:09 +09:00
parent 3ebc0f84e0
commit 51e346a477
8 changed files with 2176 additions and 50 deletions
+14
View File
@@ -1,5 +1,6 @@
import {
computeDixonSpectralFlux,
estimateDixonSpectralFluxWorkload,
pickCausalSpectralFluxPeaks,
} from "/packages/acoustics-core/spectral-flux.js";
@@ -90,6 +91,19 @@ test("Dixon flux는 Hamming linear magnitude의 양의 차이를 full DFT에서
assertEqual(result.workload.positiveDifferenceBytes, 64, "raw bin bytes");
assertEqual(result.workload.outputBytes, 128, "total returned typed-array bytes");
assertEqual(result.workload.maximumOutputBytes, 128, "caller output limit");
const preflight = estimateDixonSpectralFluxWorkload({
sampleCount: 8,
fftSize: 4,
hopSize: 4,
maximumOutputBytes: 128,
});
assertEqual(preflight.frameCount, result.frameCount, "preflight frame count");
assertEqual(preflight.outputBytes, result.workload.outputBytes, "preflight output bytes");
assertEqual(
preflight.estimatedPeakTypedArrayBytes,
result.workload.estimatedPeakTypedArrayBytes,
"preflight peak typed-array bytes",
);
});
test("Dixon flux는 silence와 incomplete tail을 패딩 없이 처리한다", () => {