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

@plumbus/voice-livekit

v0.1.4

Published

LiveKit transport, agent worker, and browser session helpers for @plumbus/voice.

Downloads

511

Readme

@plumbus/voice-livekit

LiveKit transport, agent worker, and browser session helpers for Plumbus voice. Register as transport.provider: 'livekit', mint room tokens, join agent workers, and run continuous or push-to-talk sessions without pulling LiveKit into @plumbus/voice itself.

npm license peer: @plumbus/core 0.6.x peer: @plumbus/voice 0.4.x

What is this?

Plumbus is an AI-native, contract-driven TypeScript application framework. @plumbus/voice is the optional voice runtime (defineVoice, routes, provider registry).

@plumbus/voice-livekit is the LiveKit adapter for that runtime. It owns the vendor SDK boundary for:

  • Transport registration (LIVEKIT_TRANSPORT_REGISTRATIONtransport.provider: 'livekit')
  • Participant token minting and room session metadata
  • Agent worker entry (startVoiceAgentWorker, createVoiceAgentEntry, joinVoiceRoomSession)
  • Browser session helpers (createLiveKitVoiceSession on ./client)
  • Inbound noise-cancellation helpers (Krisp / RNNoise / DTLN) and LiveKit transport cost rows

If you're not using @plumbus/voice, this package has nothing to plug into. Install alone does not register LiveKit — you must pass LIVEKIT_TRANSPORT_REGISTRATION into createProviderRegistry().

Why?

LiveKit (and its agent/noise-cancellation SDKs) are heavy. Keeping them out of @plumbus/voice means apps that only need websocket + browser STT/TTS never pay the install or bundle cost. This package is the explicit opt-in for room-based and continuous voice stacks.

What you get

| Surface | What it does | |---|---| | LIVEKIT_TRANSPORT_REGISTRATION | Factory + descriptor for createProviderRegistry({ transport: { livekit: … } }). | | LIVEKIT_TRANSPORT_DESCRIPTOR | Catalog entry (id: 'livekit'). | | mintLiveKitParticipantToken | Server-side participant JWT for /token / room join. | | startVoiceAgentWorker / createVoiceAgentEntry / joinVoiceRoomSession | Agent dispatch and room-join worker APIs. | | createInboundAudioStream / resolveAgentNoiseCancellationOption | Agent-side NC wiring. | | parseLiveKitParticipantContext / buildBrainInputFromParticipantContext | Participant metadata → brain input. | | recordLiveKitTransportCost / LIVEKIT_VOICE_PRICING | Transport spend into the shared AI ledger. | | @plumbus/voice-livekit/client | createLiveKitVoiceSession, applyClientNoiseCancellation, PCM helpers. | | @plumbus/voice-livekit/worker | Agent worker entry helpers for plumbus voice worker. |

Status

Optional add-on of @plumbus/voice 0.4.x and @plumbus/core 0.6.x. Implements LiveKit transport registration, agent worker bootstrap, browser session helpers, NC engines, and transport cost recording. WebSocket transport stays built into @plumbus/voice.

Install

pnpm add @plumbus/voice @plumbus/voice-livekit

Peers (copy literals):

  • @plumbus/core 0.6.x — required
  • @plumbus/voice 0.4.x — required
  • livekit-client ^2.0.0 — optional; needed for browser sessions
  • @livekit/krisp-noise-filter ^0.4.0 — optional; client Krisp NC
  • fastify ^5.0.0 — optional peer (reserved for app servers)

Env: LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET.

Quick start

import { createProviderRegistry, defineVoice, registerVoiceRoutes } from '@plumbus/voice';
import { LIVEKIT_TRANSPORT_REGISTRATION } from '@plumbus/voice-livekit';
import { onRoutesRegistered } from '@plumbus/core';

export const voiceProviderRegistry = createProviderRegistry({
  transport: { livekit: LIVEKIT_TRANSPORT_REGISTRATION },
  // also register STT/TTS *_REGISTRATION from other @plumbus/voice-* packages
});

export const supportVoice = defineVoice({
  name: 'support',
  access: { roles: ['user'] },
  transport: { provider: 'livekit', mode: 'continuous' },
  stt: { provider: 'web-speech', languages: ['en-US'] },
  tts: { provider: 'browser-tts', locale: 'en-US', voiceId: 'default' },
  brain: {
    async run(_ctx, args) {
      return { text: args.transcript ?? '' };
    },
  },
});

onRoutesRegistered((app, routeConfig) => {
  registerVoiceRoutes(app, routeConfig, [supportVoice], {
    registry: voiceProviderRegistry,
    providers: {
      providers: {
        livekit: {
          url: process.env['LIVEKIT_URL'],
          apiKey: process.env['LIVEKIT_API_KEY'],
          apiSecret: process.env['LIVEKIT_API_SECRET'],
        },
        'web-speech': {},
        'browser-tts': {},
      },
    },
    sessionTokenSecret: process.env['VOICE_SESSION_TOKEN_SECRET'],
  });
});

Export the same voiceProviderRegistry from app/voice/registry.ts so plumbus voice worker can load it. Use beforeSession.room (not .livekit) for /token mint options.

Browser client:

import { createLiveKitVoiceSession } from '@plumbus/voice-livekit/client';

Key gotchas

  • Install alone does not register. Pass LIVEKIT_TRANSPORT_REGISTRATION into createProviderRegistry and pass that registry to routes/workers.
  • No soft auto-load. There is no createRegistryForVoices / VOICE_ADDON_PACKAGES path — CLI/workers require app/voice/registry.ts.
  • Import moves from 0.3.x: session helpers → @plumbus/voice-livekit/client; worker helpers → @plumbus/voice-livekit. See docs/upgrading-voice-provider-packages.md.
  • Do not import @livekit/* / livekit-client directly for Plumbus voice sessions — use this package's exports.

Documentation / Agent recipes

  • Concept docs: docs/voice/livekit-continuous-voice.md, docs/voice/transports.md, docs/voice/noise-cancellation.md
  • Upgrade guide: docs/upgrading-voice-provider-packages.md
  • Agent recipes (after install, open these exact paths):
    • node_modules/@plumbus/voice-livekit/instructions/README.md — index + critical rules
    • node_modules/@plumbus/voice-livekit/instructions/framework.md — install, peers, exports, registration
    • node_modules/@plumbus/voice-livekit/instructions/client-session.md — browser session
    • node_modules/@plumbus/voice-livekit/instructions/agent-worker.md — worker / CLI
    • node_modules/@plumbus/voice-livekit/instructions/noise-cancellation.md — NC matrix
    • node_modules/@plumbus/voice/instructions/continuous-sessions.md — talk-over re-queue, stitched transcripts, sentence chunker

The Plumbus ecosystem

@plumbus/voice-livekit is one package in the Plumbus framework. For the full list of packages and when to use each, see the Plumbus monorepo README.

Links

License

MIT