npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

livekit-plugins-dtln

v0.1.5

Published

DTLN noise suppression plugin for LiveKit — self-hosted, in-process, no cloud API

Readme

livekit-plugins-dtln

npm License: MIT

In-process DTLN noise suppression for Node.js — self-hosted, open-source alternative to Krisp/noisecancellation plugins. No cloud API, no per-minute billing. Works with any LiveKit deployment or standalone.

Install

npm install livekit-plugins-dtln

ONNX model weights (~4 MB) are bundled in the package — no extra downloads needed.

Quick Start

import { DTLNNoiseSuppressor } from "livekit-plugins-dtln";

const suppressor = new DTLNNoiseSuppressor({ strength: 0.7 });
await suppressor.init();

// Process 16kHz mono float32 audio
const denoised = await suppressor.processAudio(samples);

// Or raw Int16 PCM (WebRTC-style)
const denoisedPcm = await suppressor.processInt16(pcmBuffer);

// Done
await suppressor.close();

With LiveKit (@livekit/rtc-node)

Handles any sample rate (48kHz, 16kHz, etc.) and channel count automatically:

import { DTLNNoiseSuppressor } from "livekit-plugins-dtln";
import { Room, RoomEvent, AudioStream } from "@livekit/rtc-node";

const suppressor = new DTLNNoiseSuppressor({ strength: 0.7 });
await suppressor.init();

room.on(RoomEvent.TrackSubscribed, (track) => {
  const stream = new AudioStream(track, 16000, 1);

  for await (const frame of stream) {
    const denoised = await suppressor.processFrame(
      frame.data, // Int16Array — any sample rate
      frame.sampleRate, // 48000, 16000, etc.
      frame.channels, // 1 or 2
    );
    // publish or use denoised audio...
  }
});

API

new DTLNNoiseSuppressor(options?)

| Option | Type | Default | Description | | -------------- | --------- | ------- | ------------------------------------------------ | | strength | number | 0.5 | Wet/dry blend (0 = bypass, 1 = full suppression) | | model1Path | string | bundled | Path to model_1.onnx | | model2Path | string | bundled | Path to model_2.onnx | | debugLogging | boolean | false | Log spectral mask stats every ~800ms |

Methods

| Method | Input | Output | Use case | | ----------------------------- | ------------------------------- | ----------------------- | ------------------------------- | | init() | — | Promise<void> | Load ONNX models (call once) | | processAudio(samples) | Float32Array 16kHz mono | Promise<Float32Array> | Pre-resampled audio | | processInt16(pcm) | Int16Array 16kHz mono | Promise<Int16Array> | Raw PCM buffers | | processFrame(pcm, rate, ch) | Int16Array, any rate/channels | Promise<Int16Array> | LiveKit frames (auto-resamples) | | close() | — | Promise<void> | Release ONNX sessions |

Properties

  • enabled — get/set boolean to bypass processing
  • initialized — read-only, true after init()

How It Works

Two-stage LSTM pipeline via ONNX Runtime:

Audio → FFT → Magnitude → [LSTM Model 1: Spectral Mask] → Masked IFFT
      → [LSTM Model 2: Time-domain Refinement] → Denoised Output

Platform Support

| Platform | Status | | ---------------------- | ------ | | Linux x64 | ✓ | | Linux ARM64 (Graviton) | ✓ | | macOS x64/ARM | ✓ | | Windows x64 | ✓ | | Node.js 18+ | ✓ | | CommonJS (require) | ✓ | | ESM (import) | ✓ |

Performance

  • CPU: ~2-4ms per 128-sample frame (8ms of audio) on x86-64
  • Memory: ~50 MB (ONNX Runtime + model weights)
  • Concurrency: One instance per session; safe to run many in parallel

License

MIT

Credits