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

@justanotherkevin/awol

v0.1.0

Published

AWOL (audio wave object labeler) labels what each speaker in a live conversation is doing, using a small decision model running in LM Studio.

Readme

AWOL

AWOL stands for audio wave object labeler. It labels what each speaker in a live conversation is doing, using a small decision model running on your own machine.

What it does

You give AWOL the transcript text of each speaker as it arrives. When a speaker finishes a turn, AWOL sends that speaker's text to the decision model with one or more questions. The model answers, and AWOL hands you a labeled decision. The decision has the option the model chose and the probability of every option.

Results are kept per speaker. A new request for one speaker never drops or cancels the request of the other speaker. Within one speaker, if an older request finishes after a newer one has already been delivered, the older result is dropped. Each speaker can have at most 2 requests running at once. When a third starts, the oldest one for that speaker is cancelled.

Requirements

  • Node.js 20.3 or newer.
  • LM Studio with the System One endpoint POST /v1/systemone. This package was tested with LM Studio 0.4.28. Older versions do not have this endpoint, so update LM Studio first. Documentation: https://lmstudio.ai/docs/developer/jev-compat/systemone
  • A decision model downloaded and loaded in LM Studio. It must be a decision model, not a chat model, because this endpoint rejects chat models. Load it with lms load <model>. The LM Studio local server must be running. Its default address is http://localhost:1234. This README uses kev-4b as an example identifier. Replace it with the identifier of your own decision model.
  • A speech to text service that gives you final transcript text for each speaker and a signal for the end of a turn. AWOL does not capture audio and does not transcribe. It starts from text. The speech_final event from Deepgram is one example of an end of turn signal.

Install

npm install @justanotherkevin/awol

Check the model is ready

import { checkReady } from '@justanotherkevin/awol';

const readiness = await checkReady({
  host: 'http://localhost:1234',
  model: 'kev-4b',
  signal: AbortSignal.timeout(5000),
});

The result is one of these values:

  • ready: the model is loaded and can answer.
  • not_loaded: LM Studio knows the model but it is not loaded. Run lms load kev-4b.
  • not_found: LM Studio does not know a model with this identifier.
  • unreachable: the server did not answer. Check that the LM Studio local server is running and that the host is right.

Quick start

import { classify, DecisionLoop } from '@justanotherkevin/awol';

type Speaker = 'them' | 'me';

const options = { host: 'http://localhost:1234', model: 'kev-4b' };

const loop = new DecisionLoop<Speaker>({
  buildRequest: (speaker, text) => {
    if (speaker === 'them') {
      return {
        state: { text },
        questions: {
          kind: {
            type: 'choice',
            instructions: 'Is this a short fact question or a hard question?',
            criteria: {
              short: 'A short question with a quick factual answer.',
              hard: 'A question that needs reasoning or a long answer.',
            },
          },
        },
      };
    }
    return {
      state: { text },
      questions: {
        topic: {
          type: 'choice',
          instructions: 'Which of these topics is the speaker choosing?',
          criteria: {
            pricing: 'The speaker picks pricing.',
            schedule: 'The speaker picks the schedule.',
            none: 'The speaker picks none of these topics.',
          },
        },
      },
    };
  },
  classify: (request, { signal }) => classify(request, { ...options, signal }),
  onDecision: decision => {
    if (!decision.answers) {
      console.log(`${decision.speaker} failed: ${decision.failure}`);
      return;
    }
    for (const [id, answer] of Object.entries(decision.answers)) {
      if (typeof answer === 'number') continue;
      const probability = answer.probabilities[answer.choice];
      if (probability >= 0.6) {
        console.log(`${decision.speaker} ${id}: ${answer.choice} (${probability})`);
      }
    }
  },
});

speechToText.on('transcript', event => {
  loop.transcript({ speaker: event.speaker, text: event.text, final: event.isFinal });
});

speechToText.on('speech_final', event => {
  loop.endOfTurn(event.speaker);
});

process.on('SIGINT', () => loop.stop());

speechToText stands for your own speech to text client. Any service that gives you text per speaker and an end of turn signal will work.

API reference

classify(request, options)

Sends one request to POST {host}/v1/systemone and returns a ClassifyResult. It never throws for server or network problems. It throws only if you abort it with your own signal.

Options:

  • host: the LM Studio address, for example http://localhost:1234.
  • model: the identifier of the decision model.
  • signal: an AbortSignal that cancels the request.
  • timeoutMs: optional. The default is 4000.

A ClassifyRequest has state, an object with the facts the model can see, and questions, an object that maps a question id to a question.

checkReady(options)

Takes the same options as classify. Returns 'ready' | 'not_loaded' | 'not_found' | 'unreachable'.

DecisionLoop<S extends string>

S is the type of your speaker names.

new DecisionLoop<S>({
  buildRequest(speaker: S, text: string): ClassifyRequest | null,
  classify(request: ClassifyRequest, options: { signal: AbortSignal }): Promise<ClassifyResult>,
  onDecision(decision: Decision<S>): void,
})
  • buildRequest turns a speaker's text into a request. Return null to skip that turn.
  • classify sends the request. Pass the signal on to classify from this package.
  • onDecision receives each decision.

Methods:

  • transcript({ speaker, text, final }): gives the loop some text. Only final, non empty text is kept. Kept pieces are joined with a space.
  • endOfTurn(speaker): sends the kept text of that speaker. If there is no kept text, nothing is sent.
  • stop(): cancels all running requests, drops their results and clears the kept text.

Decision<S>

{
  speaker: S;
  text: string;
  request: ClassifyRequest;
  answers: Record<string, ClassifierAnswer> | null;
  failure: ClassifyFailureReason | null;
  durationMs: number;
}

When the request worked, answers is set and failure is null. When it failed, answers is null and failure says why.

Questions

A question with type: 'choice' and a criteria object asks the model to pick one option. The keys of criteria are the options and the values describe them.

{ type: 'choice', instructions: '...', criteria: { a: '...', b: '...' } }

A question with only instructions is sent as a noul question. The model answers it with a single number.

{ instructions: '...' }

Answers

  • A choice question gives { choice: string; probabilities: Record<string, number> }. choice is the chosen option and probabilities has one number for every option.
  • A plain question gives a number.

Failure reasons

  • timeout: the request took longer than timeoutMs.
  • network: the server could not be reached.
  • status: the server answered with an error status. The result has status and, when the server sent one, a message.
  • invalid: the server answered with a body that AWOL could not read.

Tips

  • Keep one question per request. It gives the lowest delay.
  • Send a warm up request after you load the model, because the first call is slow.
  • Choose your probability thresholds from your own data.

License

MIT