Why Features Compare Platforms Docs

Cross-platform, low-latency microphone streaming for Node.js

No ffmpeg. No SoX. No setup. Capture audio from the system microphone and pipe it anywhere: speech engines, WebSockets, or files.

Install with one command:

$ npm install decibri Copied!

Then start streaming:

JavaScript
const Decibri = require('decibri');
const mic = new Decibri({ sampleRate: 16000, channels: 1 });

mic.on('data', (chunk) => {
  websocket.send(chunk); // stream audio to your backend
});

Microphone input in Node.js is harder than it should be

Requires external tools like ffmpeg or SoX
Inconsistent across macOS, Windows, and Linux
Subprocess overhead and complex setup
Painful setup for something that should be simple

Designed for real-time systems

A native Node.js addon wrapping PortAudio. Statically linked, zero system dependencies, with pre-built binaries so there's nothing to compile.

Cross-platform

macOS, Windows, and Linux with pre-built binaries. No build tools required on any platform.

Direct capture

100ms audio chunks by default (1600 frames at 16kHz). PortAudio captures directly from the OS audio layer with no subprocess, no shell, and no intermediate encoding.

Stream interface

Standard Node.js Readable stream. Pipe to files, WebSockets, or speech engines directly.

Zero dependencies

No ffmpeg, no SoX, no system audio libraries. PortAudio is compiled and statically linked.

TypeScript ready

Bundled type definitions. Full IntelliSense for options, events, and device enumeration.

Configurable

Sample rate, channels, frames per buffer, device selection by index or name, int16 or float32 output, and optional voice activity detection with speech/silence events.

Built for real-time voice applications

Real-time transcription
Wake word detection
Voice agents & assistants
Streaming audio pipelines
Speech-to-text engines
Audio monitoring

Record audio to disk

Because decibri exposes a standard Node.js Readable stream, you can pipe audio directly to a file. Set the sample rate and channels to match your target format. No encoding step, no intermediate buffers.

Pipe to file
const Decibri = require('decibri');
const fs = require('fs');

const mic = new Decibri({ sampleRate: 44100, channels: 2 });
mic.pipe(fs.createWriteStream('capture.raw'));

Works with your existing stack

decibri outputs raw 16-bit PCM, the standard format expected by speech and audio processing engines. See the integration guides for working examples.

decibri's raw PCM output is also compatible with Vosk, openWakeWord, and any engine that accepts standard audio input.

View all docs →

Real products, powered by decibri

Open-source tools that use decibri as their audio capture layer. From voice agents to wake phrase detection.

These products use decibri as their audio capture layer. decibri handles the microphone. Each product adds its own processing on top.

The right tool for the job

Use decibri when you need raw PCM audio from a system microphone inside a Node.js process. For example, feeding audio to a local speech-to-text engine, a wake word detector, or a real-time WebSocket pipeline. For browser-based audio capture, see decibri-web, which provides the same API using the Web Audio API with zero dependencies.

Other approaches

  • mic npm package requires SoX or arecord installed on the system
  • microphone-stream is browser-only and does not work in Node.js
  • Shelling out to ffmpeg adds latency, process management, and a large dependency
  • Most alternatives have no prebuilt binaries and require build tools on every machine

decibri

  • Native PortAudio addon with no system audio tools needed
  • Purpose-built for Node.js server-side and CLI use cases
  • Prebuilt binaries ship in the package with zero post-install setup
  • Standard Readable stream API: pipe, transform, and compose

Pre-built binaries, zero setup

Pre-compiled native binaries ship inside the package. No build tools, no compilation, no post-install downloads.

Windows 11
x64
macOS
arm64 (Apple Silicon)
Linux
x64
Linux
arm64

Common questions

16-bit signed integer PCM, little-endian by default. A 32-bit float format is also available. The default is the raw format expected by most speech and wake-word engines including Vosk, sherpa-onnx, and whisper.cpp.

No. decibri bundles PortAudio as a statically linked native addon. There are no system dependencies to install.

No. Pre-built binaries for Windows x64, macOS arm64, and Linux x64/arm64 ship inside the npm package. If no binary is available for your platform, it falls back to compiling from source.

The Node.js package is a native addon for server-side and CLI use only. For browser-based capture, see decibri-web, which provides the same API using the Web Audio API with zero dependencies.

Yes. Use Decibri.devices() to list available input devices, then pass the device index or a name substring to the constructor options.

Node.js 18 and above.

Apache-2.0.

Start streaming audio in minutes

One install. One import. Real-time microphone audio.

$ npm install decibri Copied!