Decibri – unified audio layer for AI agents and Voice AI applications

vyrotek2 pts0 comments

Decibri | Unified Audio AI for Python, Node.js, and Rust

Skip to main content

Why<br>Features<br>Compare<br>Platforms<br>CLI<br>Docs

The unified audio layer for AI agents and Voice AI applications

Capture real-time microphone audio, play to speakers, or pipe anywhere (voice agents, WebSockets, or files) using Python, Node.js, or Rust. Built-in voice activity detection. Zero system dependencies. Zero setup.

Get Started

Install with one command:

pip install decibri

Then start streaming:

Python<br>Node.js<br>Rust

import decibri

with decibri.Microphone(sample_rate=16000) as mic:<br>for chunk in mic:<br>print(f"Got {len(chunk)} bytes")<br>break

const { Microphone } = require('decibri');

const mic = new Microphone({ sampleRate: 16000 });<br>mic.on('data', (chunk) => console.log(`Got ${chunk.length} bytes`));<br>setTimeout(() => mic.stop(), 5000);

use std::time::Duration;<br>use decibri::{DecibriError, Microphone, MicrophoneConfig};

fn main() -> ResultBoxdyn std::error::Error>> {<br>let capture = Microphone::new(MicrophoneConfig::default())?;<br>let stream = capture.start()?;<br>loop {<br>match stream.next_chunk(1600, Some(Duration::from_millis(100))) {<br>Ok(Some(chunk)) => println!("Got {} samples", chunk.data.len()),<br>Ok(None) => continue,<br>Err(DecibriError::MicrophoneStreamClosed) => break,<br>Err(e) => return Err(e.into()),<br>Ok(())

The Problem

Real-time audio capture and playback is harder than it should be

Requires system audio tools, build tools, or both

Inconsistent install experience across Python, Node.js, and Rust

Inconsistent runtime behavior across macOS, Windows, and Linux

Painful setup for something that should be simple

Why decibri

Designed for real-time systems

Built for real-time audio. Pre-built binaries for Python, Node.js, and Rust mean no compilers, no system audio libraries, and no setup.

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). cpal captures directly from the OS audio layer with no subprocess, no shell, and no intermediate encoding.

Stream-native

Python iterators, Node.js Readable streams, and Rust channels. Pipe to files, WebSockets, or voice agents using each language's native idioms.

Zero dependencies

No system audio libraries, no build tools, no install scripts. Rust and cpal compiled into a single package per language.

Type-safe

Bundled type definitions for Python (typing stubs), Node.js (TypeScript .d.ts), and Rust (native types). Full IDE autocomplete and inline documentation.

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.

Audio output

Play audio through the system speaker. Decibri's Speaker API works as a standard write target you can pipe capture into for full duplex audio.

ML voice detection

Bundled Silero VAD v5 model for accurate speech detection in noisy environments. Runs locally in Rust via ONNX Runtime with no cloud API needed.

Browser support

The Node.js package ships with browser support out of the box. Conditional exports serve an AudioWorklet implementation when bundled for browsers.

Platform Support

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

Use Cases

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

Decibri provides a one-line record_to_file() helper for the simple case, and full streaming control when you need it. Set the sample rate to match your target format. No encoding step, no intermediate buffers.

Python<br>Node.js<br>Rust

import decibri

decibri.record_to_file("capture.wav", duration_seconds=10, sample_rate=16000)

const { Microphone } = require('decibri');<br>const fs = require('fs');

const mic = new Microphone({ sampleRate: 16000, channels: 1 });<br>mic.pipe(fs.createWriteStream('capture.raw'));

use decibri::sample::f32_to_i16_le_bytes;<br>use decibri::{Microphone, MicrophoneConfig};<br>use std::fs::File;<br>use std::io::Write;

fn main() -> ResultBoxdyn std::error::Error>> {<br>let mut file = File::create("capture.raw")?;<br>let capture = Microphone::new(MicrophoneConfig::default())?;<br>let stream = capture.start()?;<br>while let Ok(Some(chunk)) = stream.next_chunk(1600, None) {<br>file.write_all(&f32_to_i16_le_bytes(&chunk.data))?;<br>Ok(())

When to use decibri

Audio infrastructure for real-time applications

Decibri sits between your application and the operating system. It captures from microphones, plays to speakers, and runs voice activity detection, all in real-time. Use it when you need predictable, low-latency audio I/O without managing system dependencies or platform differences.

Decibri is built...

audio decibri capture voice rust microphone

Related Articles