4 ms·
Code Example: const pipeline = await createDspPipeline({ redisHost: "localhost", redisPort: 6379, stateKey: "dsp:user:ch1", }); pipeline .filter({type
by a-kgeorge 11mo ago
Code Example:
const pipeline = await createDspPipeline({
redisHost: "localhost",
redisPort: 6379,
stateKey: "dsp:user:ch1",
});
pipeline
.filter({type:"butterworth",mode:"bandpass",lowCutoffFrequency:20,highCutoffFrequency:450})
.stft({windowSize:512,hopSize:160})
.melSpectrogram({numMelBands:26})
.mfcc({numCoefficients:13});
await pipeline.process(audioData, {sampleRate:16000});
const state = await pipeline.saveState();
// worker dies → new worker
await pipeline.loadState(state);
Platform
• x64 + ARM
• Tested on Pixel 9 Pro XL (stable; NEON tuning pending)
• Node 18/20/22
• N-API v8
• Prebuilds for x64 (Linux/macOS/Win)
• ARM compiles once → works like normal
Why not WASM?
• Native threading
• AVX2/SSE2/NEON
• Zero-copy buffers to/from Redis
• Clean integration w/ Node streams
- a-kgeorge 11mo agoWho It’s For • Node backends running streaming DSP • Systems needing stateful pipelines + fault tolerance • Teams avoiding separate Python/C++ services • IoT gateways w/ intermittent workloads Not ideal: • Browser-only DSP (use WebAudio) • Hard realtime (<1ms) embedded audio Help Wanted • Portable NEON optimization (FFT + convolution) • Kafka integration (batching / backpressure / checkpoints) • Production war stories Status STFT / Mel / MFCC Convolution + FFT (native C/C++) Redis persistence stable ARM functional (not optimized) 891 tests passing Kafka integration (seeking input) Repos: https://github.com/a-kgeorge/dspx https://github.com/a-kgeorge/dspx https://github.com/a-kgeorge/dspx-benchmark https://github.com/a-kgeorge/dspx-benchmark