Skip to content
neonlanternPublic
forked from decibri/decibri

About

Cross-platform audio capture, playback, and voice activity detection for Python, Rust, and Node.js powered by a single Rust core.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

decibri

decibri

Cross-platform audio capture, playback, and voice activity detection for Python, Rust, and Node.js.

PyPI version  npm version  crates.io version  Apache 2.0 License  decibri.com  Docs


What is decibri?

Decibri is a cross-platform audio engine for real-time speech and voice applications. One unified API across Python, Rust, Node.js, and browsers.

Key features:

  • Microphone capture and speaker playback
  • Voice activity detection (Silero or energy modes)
  • Async and streaming APIs
  • Cross-platform: Windows, macOS, Linux, browsers
  • Available in Python, Node.js, and Rust
  • Cloud and local speech-to-text integrations

To learn more, visit decibri.com/docs/.

Installation

Python (recommended with uv):

uv pip install decibri

Or with pip:

pip install decibri

Node.js:

npm install decibri

Rust:

cargo add decibri

Quick Start

Python

import decibri

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

Full Python guide: here.


Node.js

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

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

Full Node.js and browser guide: here.


Rust

use decibri::{Microphone, MicrophoneConfig};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let microphone = Microphone::new(MicrophoneConfig::default())?;
    let stream = microphone.start()?;
    while let Ok(Some(chunk)) = stream.next_chunk(None) {
        println!("Got {} bytes", chunk.data.len());
    }
    Ok(())
}

Full Rust guide: here.


Platform Support

Supports:

  • Windows x64
  • macOS arm64
  • Linux x64
  • Linux arm64

Voice Activity Detection

Decibri ships two VAD modes:

  • Energy mode: lightweight RMS threshold.
  • Silero mode: ML-based detection using the Silero VAD v5 ONNX model. More accurate, especially in noisy environments. The model (~2.3 MB) is bundled; no downloads or API keys required.
import decibri

with decibri.Microphone(sample_rate=16000, vad="silero", vad_threshold=0.5) as mic:
    for chunk in mic:
        print(f"VAD score {mic.vad_score}; speaking={mic.is_speaking}")
        break

The same VAD API is available in Node.js and Rust. Language-specific examples and tuning advice live in each binding's README.


Integrations

Decibri pipes microphone audio directly into cloud and local speech services. Full guides at decibri.com/docs/integrations.

Provider Environment STT TTS VAD KWS
OpenAI Realtime Cloud ✅ ✅
Deepgram Cloud ✅ ✅
AssemblyAI Cloud ✅
Mistral Voxtral Cloud ✅
AWS Transcribe Cloud ✅
Google Speech Cloud ✅ ✅
Azure Speech Cloud ✅ ✅
Sherpa-ONNX Local ✅ ✅ ✅ ✅
Whisper.cpp Local ✅

Architecture

Decibri is built on a single Rust core. The same audio engine powers all three language bindings, ensuring consistent behavior regardless of which language you use.

Python and Node.js install pre-built native binaries for your platform. Browsers run the same API via a JavaScript implementation that ships inside the npm package.


Contributing

Issues and PRs welcome. See CONTRIBUTING.md for development setup.


License

Apache-2.0 © 2026 Decibri.

About

Cross-platform audio capture, playback, and voice activity detection for Python, Rust, and Node.js powered by a single Rust core.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages