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

@memberjunction/ai-bridge-livekit-native

v5.48.0

Published

MemberJunction: the REAL native LiveKit room-client module for the LiveKit Realtime Bridge. Wraps @livekit/rtc-node (the Node WebRTC participant) behind the NativeRoomModule contract that @memberjunction/ai-bridge-livekit's LiveKitNativeMeetingSdk expects

Readme

@memberjunction/ai-bridge-livekit-native

The real native LiveKit room client for the MemberJunction LiveKit Realtime Bridge — the piece that makes an agent actually talk and hear in a live LiveKit room. It wraps @livekit/rtc-node (LiveKit's Node WebRTC participant) behind the NativeRoomModule contract that @memberjunction/ai-bridge-livekit's LiveKitNativeMeetingSdk expects.

realtime model ──IRealtimeSession──► AIBridgeEngine transport seam ──► LiveKitBridge
                                                                          │ SetSdkFactory(BindLiveKitNative())
                                                                          ▼
                                                            LiveKitNativeMeetingSdk  (the adapter — in ai-bridge-livekit)
                                                                          │ NativeModuleSpecifier
                                                                          ▼
                                                  @memberjunction/ai-bridge-livekit-native  ◄── THIS PACKAGE
                                                                          │
                                                                          ▼
                                                                  @livekit/rtc-node  (the real WebRTC participant)

What it does

  • Voice outpublishAudio(pcm) captures the agent's synthesized PCM onto a published LiveKit audio track (AudioSourceLocalAudioTrack), so every participant hears the agent.
  • Hearing in — each remote participant's subscribed audio track is read via an AudioStream and surfaced as a diarized { data, participantIdentity, name } frame.
  • Roster + chat — participant connect/disconnect events and the reliable data channel.

Video/screen publish are documented one-time-warned no-ops in this voice-MVP wrapper (LiveKit supports them; they need a VideoSource + frame-format work that's out of scope here).

Use it

Point the bridge's NativeModuleSpecifier straight at this package and the engine does the rest (the LiveKit native binding is the registered default for DriverClass = 'LiveKitBridge'):

// the session Configuration the LiveKit coordinator passes to the bridge:
{
  "NativeModuleSpecifier": "@memberjunction/ai-bridge-livekit-native",
  "AccessToken": "<pre-signed LiveKit join token, minted upstream>",
  "BotDisplayName": "Sage",
  "RoomName": "demo-room"
}

Install the addon on the server that runs the agent bot:

npm install @livekit/rtc-node    # native addon — the agent bot host needs it

@livekit/rtc-node is an optionalDependency loaded lazily, so this package builds and unit-tests without the addon (tests inject a fake module). When the addon is absent at runtime, connect() throws an actionable "install @livekit/rtc-node" error.

🔴 Sample rates (read this before the live test)

The realtime model emits/consumes PCM at a specific rate, and @livekit/rtc-node resamples for you only if told the right rate. Defaults are 24 kHz mono (OpenAI-Realtime-compatible: xAI Grok Voice, etc.). Gemini Live wants 16 kHz inbound. A mismatch produces chipmunk / garbled audio — it is the #1 live-test failure mode, not a logic bug.

To override, write a one-line module and point NativeModuleSpecifier at it:

// my-livekit-native-gemini.ts
import { CreateLiveKitRtcNodeModule } from '@memberjunction/ai-bridge-livekit-native';
export default CreateLiveKitRtcNodeModule({ InboundSampleRate: 16000, OutboundSampleRate: 24000 });

API

  • CreateLiveKitRtcNodeModule(opts?) → a NativeRoomModule. Options: OutboundSampleRate, InboundSampleRate, Channels, Loader (inject a fake @livekit/rtc-node for tests).
  • LiveKitRtcNodeRoomClient — the NativeRoomClient implementation (connect / publishAudio / onAudioFrame / roster / publishData / disconnect).
  • Pure helpers: pcmToInt16, int16ToArrayBuffer, participantsToArray — unit-tested directly.
  • defaultRtcNodeLoader — the lazy @livekit/rtc-node loader (with the actionable absent-addon error).

⚠️ The exact @livekit/rtc-node surface is pinned from the SDK docs and marked with // VERIFY against @livekit/rtc-node notes in livekit-rtc-node-room.ts (Room/AudioSource/AudioStream/AudioFrame ctors, RoomEvent/TrackKind member names, connect/publishData/publishTrack signatures). A live test against a real LiveKit server should confirm them.

Testing

cd packages/AI/RealtimeBridge/Providers/LiveKitNative && npm run test

14 tests against a fake @livekit/rtc-node (no addon, no network): the pure PCM helpers, the connect→publish-track flow, both audio directions (outbound captureFrame at the configured rate + inbound AudioStream→diarized frame), participant events, roster, data publish, disconnect teardown, the sample-rate overrides, the video/screen no-ops, and the loader's present/absent branches.