All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
This repository is preserved for historical reference. The C++ implementation has been superseded by decibri v3 (Rust rewrite) at github.com/decibri/decibri.
- Repository transferred from
github.com/analyticsinmotion/decibritogithub.com/decibri/decibri.cpp(April 2026) - Automated workflows disabled
- No further releases will be published under this package name from this repository
- See github.com/decibri/decibri or decibri.com for current development
- BREAKING: Renamed package from
@analyticsinmotion/micstreamtodecibri. - BREAKING: Renamed JavaScript class from
MicStreamtoDecibri. - BREAKING: Renamed TypeScript interface from
MicStreamOptionstoDecibriOptions. - BREAKING:
version()return key changed frommicstreamtodecibri. - BREAKING: Compiled binary renamed from
micstream.nodetodecibri.node. - Renamed C++ source file from
src/micstream.cctosrc/decibri.cc. - Renamed C++ class from
MicStreamtoDecibri. - Updated all documentation, examples, tests, and types for new naming.
- Homepage moved from
micstream.devtodecibri.dev. - Repository moved from
analyticsinmotion/micstreamtoanalyticsinmotion/decibri.
// Before (v0.4.0)
const MicStream = require('@analyticsinmotion/micstream');
const mic = new MicStream({ sampleRate: 16000, channels: 1 });
// After (v1.0.0)
const Decibri = require('decibri');
const mic = new Decibri({ sampleRate: 16000, channels: 1 });- Voice activity detection (VAD) — energy-threshold speech/silence detection in the
JS layer. Enable with
vad: true; tune sensitivity withvadThreshold(RMS 0–1, default0.01) andvadHoldoff(ms before'silence'fires, default300). Emits'speech'and'silence'events. No native rebuild required. - Device selection by name —
deviceoption now accepts a case-insensitive substring string in addition to a numeric index. Throws a descriptiveTypeErrorif the substring matches zero or multiple devices. - Worked examples in
examples/:wav-capture.js— capture to a valid WAV file (no extra dependencies)websocket-stream.js— stream raw PCM to a WebSocket serverwebsocket-server.js— minimal test receiver (requiresws)
- Pre-built binaries now bundle inside the npm package (
prebuilds/) and are loaded directly bynode-gyp-buildatrequire()time — no install-time network call to GitHub Releases. Eliminatesprebuild-installas a runtime dependency. - Removed deprecated
prebuild(build/upload) andprebuild-install(download) toolchain. CI now builds withnode-gyp rebuild, stages artifacts, and publishes to npm via a dedicated publish job.
- Upgraded
node-gypto^12.0.0to resolve four high-severity vulnerabilities in the transitivetardependency (GHSA-r6q2-hw4h-h46w, GHSA-34x7-hfp2-rc4v, GHSA-8qq5-rm4j-mr97, GHSA-83g3-92jg-28cx).
- TypeScript declarations (
types/index.d.ts) — full type coverage forDecibri,DecibriOptions,DeviceInfo, andVersionInfowith typed event overloads for allReadableevents plusbackpressure. No@types/install required. - macOS microphone permission helper — checks
AVCaptureDeviceauthorization status before opening the PortAudio stream. When access is denied or restricted, emits a clear, actionable error (Microphone access denied. Enable access in System Settings → Privacy & Security → Microphone.) instead of silently delivering zero-amplitude audio. formatoption ('int16'|'float32') — opt in to 32-bit float PCM output. Default is'int16'; existing code requires no changes. Zero-copy view:new Float32Array(chunk.buffer, chunk.byteOffset, chunk.length / 4).
- Initial release (as
@analyticsinmotion/micstream). - Cross-platform microphone audio capture via PortAudio, statically compiled — no system audio library required at runtime on Windows or macOS.
- Node.js
Readablestream interface emitting raw PCMBufferchunks (16-bit signed integer, little-endian). - Default audio format: 16 000 Hz, mono, 100 ms chunks (1 600 frames per callback) — optimised for speech and wake-word workloads.
- Configurable
sampleRate(1 000–384 000 Hz),channels(1–32),framesPerBuffer(64–65 536), anddeviceindex options. stop()method for clean stream termination and EOF signalling.isOpenproperty indicating whether the microphone is actively capturing.backpressureevent emitted when the internal buffer is full and the consumer is reading too slowly.Decibri.devices()static method listing all available audio input devices with index, name, channel count, sample rate, and default flag.Decibri.version()static method returning decibri and bundled PortAudio version strings.- Windows x64 support via WASAPI with automatic format conversion, allowing any requested sample rate regardless of the device's native mix format.
- macOS ARM64 (Apple Silicon) support via CoreAudio.
- Linux x64 and Linux ARM64 support via ALSA.
- Pre-built binaries for all four supported platform/architecture combinations, distributed via GitHub Releases.
prebuild-installintegration for automatic binary download atnpm installtime.node-gyp rebuildsource-build fallback for unsupported platforms or environments without pre-built binaries.- GitHub Actions CI workflow building and uploading prebuilds to GitHub Releases on version tags.