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

modular-voice-agent-sdk

v2.9.3

Published

Modular isomorphic STT → LLM → TTS pipeline library for AI voice agents and voice assistants

Readme

Modular Voice Agent SDK (MVAS)

Build voice assistants without the plumbing. One SDK, any backend, same interface.

Voice apps either need expensive multimodal models, or a pipeline of three pieces: speech-to-text, an LLM, text-to-speech. Wiring them together means audio capture code, streaming logic, WebSocket boilerplate. This library handles all of that.

import { createVoiceClient, WebSpeechSTT, WebSpeechTTS } from 'modular-voice-agent-sdk/client';
import { TransformersLLM } from 'modular-voice-agent-sdk';

const client = createVoiceClient({
  create: (modelStore) => ({
    stt: new WebSpeechSTT(),
    llm: new TransformersLLM({ model: 'HuggingFaceTB/SmolLM2-360M-Instruct' }, modelStore),
    tts: new WebSpeechTTS(),
    systemPrompt: 'You are a helpful assistant.',
  }),
});

await client.connect();
button.onmousedown = () => client.startRecording();
button.onmouseup = () => client.stopRecording();

That's a working voice assistant. No server required. See examples/example-0-bare-bones for the complete 30-line HTML version.

Mix and Match

Each component can run in the browser, on a server, or in the cloud. Pick any from each column — they all work together with the same API.

    ┌───────────────────────────┐       ┌───────────────────────────┐       ┌───────────────────────────┐
    │                           │       │                           │       │                           │
    │            STT            │ ────► │            LLM            │ ────► │            TTS            │
    │                           │       │                           │       │                           │
    └───────────────────────────┘       └───────────────────────────┘       └───────────────────────────┘

     🌐 Browser speech recognition              N/A                          🌐 Browser speech synthesis
        (Web Speech API)                                                         (Web Speech API)

     🌐 Browser JS transcriber           🌐 Browser JS LLM                    🌐 Browser JS synthesis
        (Transformers.js, WebGPU)           (Transformers.js, WebGPU)            (Transformers.js, WebGPU)

     🖥️ Server JS transcriber            🖥️ Server JS LLM                     🖥️ Server JS synthesis
        (Transformers.js, Node.js)          (Transformers.js, Node.js)           (Transformers.js, Node.js)

     🖥️ Server binary transcriber        🖥️ Server binary LLM                 🖥️ Server binary synthesis
        (whisper.cpp)                       (llama.cpp)                          (sherpa-onnx)

              N/A                         ☁️ Cloud LLM                               N/A
                                            (OpenAI, Ollama, vLLM)

              N/A                         ☁️ Cloud Audio LLM                         N/A
                                            (GPT Audio, multimodal)

              N/A                         🤖 Agent SDK                               N/A
                                            (OpenCode, Pi Agent)

Want browser speech recognition + a cloud LLM + browser speech synthesis? Done. Want everything running locally on your server with native binaries? Also done. Same code structure, same events, different backends.

Features

  • Streaming — responses stream token-by-token to TTS
  • Function calling — tools work across all LLM backends (cloud, native, transformers)
  • Agent SDK support — wrap coding agents (OpenCode, Pi Agent) as voice-controlled backends
  • Conversation history — automatic context management
  • Hybrid configs — mix browser and server components freely

See docs/USAGE.md for full API documentation.

Examples

See examples/ for interactive demos covering all configurations.

cd examples
npm install
npm run example0  # or example1, example2, etc.

Install

npm install modular-voice-agent-sdk

For native backends (whisper.cpp, llama.cpp, sherpa-onnx):

# macOS
brew install whisper-cpp llama.cpp

# Download models
npx mvas setup

For cloud LLMs:

# OpenAI
export OPENAI_API_KEY=sk-your-key-here

# Or Ollama (local, no API key)
brew install ollama && ollama pull llama3.2

License

MIT