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

@seastart/srtc-plugin-rnnoise

v0.1.0

Published

SRTC Web SDK RNNoise 降噪处理器插件

Readme

@seastart/srtc-plugin-rnnoise

基于 RNNoise(AudioWorklet + WASM)的 SRTC Web SDK 降噪处理器插件,实现 SDK 的 TrackProcessor 接口。

安装

npm i @seastart/srtc-web-sdk @seastart/srtc-plugin-rnnoise

托管静态资源

插件依赖三个静态资源(位于本包 assets/ 目录):

  • rnnoise-runtime.js
  • rnnoise-processor.js
  • rnnoise-processor.wasm

⚠️ rnnoise-runtime.js 内部通过 document.currentScript.src 定位同目录的 worklet 与 wasm,因此这三个文件必须放在同一目录,且通过 basePath 指向它。

node_modules/@seastart/srtc-plugin-rnnoise/assets/ 下三个文件拷到你的静态目录,例如:

cp node_modules/@seastart/srtc-plugin-rnnoise/assets/* public/rnnoise/

Vite 用户也可在 vite.configvite-plugin-static-copy 自动拷贝。

使用

import SRTC from "@seastart/srtc-web-sdk";
import { RnnoiseProcessor } from "@seastart/srtc-plugin-rnnoise";

const srtc = new SRTC();

const mic = srtc.createLocalMicTrack();
await mic.startCapture({ deviceId });

// 开启降噪(basePath 指向上一步托管资源的目录)
await mic.setProcessor(new RnnoiseProcessor({ basePath: "/rnnoise/" }));

await srtc.publishLocalTrack(mic);

// 关闭降噪,还原原始麦克风轨道
await mic.removeProcessor();

选项

| 选项 | 类型 | 默认 | 说明 | | --- | --- | --- | --- | | basePath | string | "/" | 静态资源所在目录,需以 / 结尾 |

注意事项

  • 仅支持音频轨道;用于视频轨道会抛错。
  • 需在 HTTPS(或 localhost)环境下运行;AudioContext 可能需用户手势后才能 resume
  • 采样率固定 48kHz。
  • 切换设备(changeDeviceId)或重新 startCapture 后,SDK 会自动重建处理器,无需再次 setProcessor