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

onyxai-sdk

v0.1.2

Published

Browser SDK for Onyx/Burki voice AI — connect to your backend WebSocket for HD voice calls with call-start, speech-start/end, interruption, and transcript events.

Readme

onyxai-sdk

Browser SDK for Onyx voice AI. Connect to your Onyx backend over WebSocket for HD voice calls with a VAPI-like API: call-start, call-end, speech-start, speech-end, interruption, and transcript events.

  • No phone numbers — browser-only; uses L16 PCM 16kHz (wideband HD), not telephone codecs.
  • Framework-agnostic client — use BurkiClient in any app.
  • React hook — optional useBurkiCall for React/Next.js.

Install

npm install onyxai-sdk

For React projects, ensure react is installed (peer dependency).

Usage

Core client (any framework)

import { BurkiClient } from "onyxai-sdk";

const client = new BurkiClient({
  baseUrl: "https://api.your-onyx.com", // or process.env.NEXT_PUBLIC_API_URL
  debug: true,
});

await client.start("123", {
  variableValues: {
    candidate_name: "John Smith",
    job_title: "Software Engineer",
  },
});

client.on("call-start", (data) => console.log("Connected", data));
client.on("speech-start", () => console.log("AI speaking"));
client.on("speech-end", () => console.log("AI done"));
client.on("transcript", (t) => console.log(t.speaker, t.content));
client.on("call-end", (data) => console.log("Ended", data.duration));
client.on("error", (e) => console.error(e.message));

// Later:
client.stop();

React hook

import { useBurkiCall } from "onyxai-sdk";

function InterviewCall() {
  const { callStatus, isSpeaking, transcript, error, start, stop } = useBurkiCall({
    baseUrl: process.env.NEXT_PUBLIC_API_URL,
    onCallStart: () => console.log("Call started"),
    onTranscript: (t) => console.log(t.speaker, t.content),
  });

  return (
    <div>
      <p>Status: {callStatus}</p>
      {callStatus === "idle" && (
        <button onClick={() => start(assistantId, { variableValues: { name: "Jane" } })}>
          Start call
        </button>
      )}
      {callStatus === "connected" && (
        <button onClick={stop}>End call</button>
      )}
      {isSpeaking && <p>AI is speaking…</p>}
      {error && <p>Error: {error}</p>}
    </div>
  );
}

API

BurkiClient

| Method / getter | Description | |-----------------|-------------| | start(assistantId, options?) | Start a call (requests mic, opens WebSocket). | | stop() | End the call and cleanup. | | setMuted(muted) / toggleMute() | Mute/unmute microphone. | | on(event, callback) / off(event, callback) | Subscribe to events. | | status | "idle" | "connecting" | "connected" | "ended". | | isMuted | Current mute state. |

Events

  • call-start — Call connected; payload: { assistantId?, assistantName? }.
  • call-end — Call ended; payload: { duration?, endedReason? }.
  • speech-start / speech-end — AI started/stopped speaking.
  • interruption — User interrupted the AI.
  • transcript — New transcript; payload: { speaker, content, isFinal, timestamp }.
  • error — Error; payload: { message, code? }.
  • status-change — Status changed; payload: { status }.

useBurkiCall (React)

Returns: callStatus, isMuted, isSpeaking, transcript, error, start, stop, toggleMute, setMuted. Options accept the same baseUrl / debug as the client plus optional callbacks: onCallStart, onCallEnd, onSpeechStart, onSpeechEnd, onInterruption, onTranscript, onError.

Backend

This SDK expects an Onyx backend that exposes a WebSocket at {baseUrl}/streams and sends the events above. It uses the same protocol as the Onyx frontend (start with provider: "browser", mediaFormat: { encoding: "audio/x-l16", sampleRate: 16000 }).

Publish

From the package directory:

cd packages/onyxai-sdk
npm run build
npm publish --access public

Use scoped name @your-org/onyxai-sdk if you prefer; update name in package.json and publish with npm publish --access public.