What is Decibri
Decibri is a unified audio layer for AI agents and Voice AI applications. It provides real-time microphone capture, speaker output, and voice activity detection for Python, Node.js, and Rust. The core is written in Rust and compiles to native code on every supported platform, so the same audio engine powers all three language packages. Decibri accesses audio devices through its Audio Host, which calls the operating system's native audio layer directly: WASAPI on Windows, CoreAudio on macOS, and ALSA on Linux. Pre-built binaries are available for Python and Node.js, so no compilers or build tools are required. The software is open source under the Apache-2.0 license.
Node.js
- Install the package:
npm install decibri - Import the Microphone class:
const { Microphone } = require('decibri'); - Create a stream:
const mic = new Microphone({ sampleRate: 16000, channels: 1 }); - Handle audio data:
mic.on('data', (chunk) => { /* process PCM audio buffer */ }); - Stop capture:
mic.stop();
Python
- Install Python 3.10 or later.
- Install Decibri:
pip install decibri(prebuilt wheels are downloaded automatically; no compiler is required). - Import the library:
import decibri - Open the microphone using a context manager:
decibri.Microphone(sample_rate=16000) - Iterate over the microphone object to receive 16-bit PCM audio chunks as Python bytes.
For asynchronous Python applications, Decibri provides AsyncMicrophone, AsyncSpeaker, and async_record_to_file() as proper async classes that work as async context managers with async for iteration. Audio capture runs on a separate thread, so the event loop isn't blocked. The recommended pattern is async with await decibri.AsyncMicrophone.open(...) as mic: async for chunk in mic: .... The open() factory dispatches the optional Silero VAD model load off the event loop.
Features of Decibri
- Cross-platform audio capture, speaker output, and voice activity detection for Python, Node.js, and Rust.
- Real-time microphone streaming with 16-bit signed integer PCM (little-endian) by default; 32-bit float format also available.
- Pre-built binaries for Python and Node.js on every supported platform (no compilers, node-gyp, Visual Studio Build Tools, or Xcode required).
- Works in both Node.js and the browser from a single package; conditional exports serve the browser implementation automatically.
- Device selection: list available input devices with
Microphone.devices()and pass the device index or a name substring to the constructor. - Asyncio support in Python with
AsyncMicrophone,AsyncSpeaker, andasync_record_to_file(). - Written in Rust for direct OS audio access, memory safety, and predictable low-latency audio.
- Supports Python 3.10+ on Windows, macOS, and Linux (prebuilt wheels for Linux x64, Linux ARM64, macOS Apple Silicon, Windows x64, and Windows ARM64; Windows ARM64 requires Python 3.11+).
- Supports Node.js 18 and above.
- Apache-2.0 license.
Use Cases of Decibri
- Real-time Voice AI applications and intelligent agents.
- Interactive physical AI.
- Speech-to-text and wake-word engines (e.g., Vosk, sherpa-onnx, whisper.cpp) that expect raw PCM audio.
- Voice activity detection (VAD) with optional Silero VAD model.
- Audio conditioning including noise suppression, automatic gain control, and echo cancellation (AEC).
- Multichannel audio capture with channel mapping and stereo capture.
- Audio file processing (WAV, FLAC, AIFF).
- Browser-based audio capture using AudioWorklet.
- Full-duplex audio for conversational AI.
- Integration with cloud transcription services (Deepgram, AssemblyAI, OpenAI, AWS Transcribe, Google Speech-to-Text, Azure Speech-to-Text) and local transcription.
Pricing
Decibri is free and open source under the Apache-2.0 license. The software is offered at no cost (price: 0 USD).
FAQ
What audio format does Decibri output? 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.
How does Decibri access audio devices? Through Decibri's Audio Host, which calls the operating system's own audio layer directly: WASAPI on Windows, CoreAudio on macOS, and ALSA on Linux.
Do I need build tools to install Decibri? Not for Python or Node.js. Pre-built binaries install with the package on every supported platform: pip fetches the wheel built for your platform, and npm adds the optional platform package that matches it. No compilers, no node-gyp, no Visual Studio Build Tools, no Xcode required. The Rust crate is compiled from source by cargo.
Does Decibri work in the browser? Yes. Decibri works in both Node.js and the browser from a single package. When bundled for the browser, conditional exports serve the browser implementation automatically.
Can I select a specific microphone?
Yes. Use Microphone.devices() to list available input devices, then pass the device index or a name substring to the constructor options.
What Node.js versions are supported? Node.js 18 and above.
What license is Decibri released under? Apache-2.0.
What Python versions are supported? Decibri supports Python 3.10 and above on Windows, macOS, and Linux. Prebuilt wheels are published for Linux x64, Linux ARM64, macOS Apple Silicon, Windows x64, and Windows ARM64. On Windows ARM64 the minimum is Python 3.11, the first CPython release published for that platform.
Does Decibri support asyncio?
Yes. Decibri ships AsyncMicrophone, AsyncSpeaker, and async_record_to_file() as proper async classes that work as async context managers with async for iteration. Audio capture runs on a separate thread, so the event loop isn't blocked. The recommended pattern is async with await decibri.AsyncMicrophone.open(...) as mic: async for chunk in mic: .... The open() factory dispatches the optional Silero VAD model load off the event loop.
Why is Decibri written in Rust? Rust gives Decibri direct OS audio access via Decibri Audio Host, a cross-platform Rust audio library. The Rust core compiles to native code on every supported platform, so the same audio engine powers the Python, Node.js, and Rust packages. Memory safety enables real-time audio code without manual buffer management. The result: predictable low-latency audio straight from the operating system's audio layer.




