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

ts-voice

v0.15.0

Published

Browser-based voice AI: **Whisper** (Transformers.js) for speech-to-text, **Kokoro** and **Supertonic** (ONNX) for text-to-speech, plus **Web Speech API** and **external HTTP** providers. Includes an embeddable **`<voice-chatbot>`** with a queued TTS pipe

Downloads

190

Readme

ts-voice

Browser-based voice AI: Whisper (Transformers.js) for speech-to-text, Kokoro and Supertonic (ONNX) for text-to-speech, plus Web Speech API and external HTTP providers. Includes an embeddable <voice-chatbot> with a queued TTS pipeline.

Installation

npm install ts-voice

Programmatic usage

import { createSTT, createTTS } from 'ts-voice';

const stt = createSTT({ provider: 'whisper' });
await stt.initialize();
await stt.start();
const text = await stt.stop();

const tts = createTTS({ provider: 'kokoro' });
await tts.initialize();
await tts.speak('Hello, world!');

docs/providers.md — all providers, external HTTP contracts, deprecated transformers aliases, and when to call tts.initialize() (Kokoro/Supertonic: early init avoids a long stall on the first speak(); omitting it defers the download until the first utterance).

Web component

import { registerVoiceChatbotElement } from 'ts-voice';

registerVoiceChatbotElement();
<voice-chatbot stt-provider="whisper" tts-provider="kokoro"></voice-chatbot>

docs/voice-chatbot.md — attributes, responseHandler, initialize(), fallback chains, defaults, and what cannot be set from HTML alone.

docs/README.md — doc index.

Examples: examples/component<voice-chatbot> Vite demos. examples/direct-api — minimal createSTT / createTTS page (no web component).

ONNX Runtime (WASM)

All ONNX-backed providers share one pinned onnxruntime-web version and load its WASM from jsDelivr by default, so each browser downloads the binary once per version. CSP: allow cdn.jsdelivr.net plus your model hosts (e.g. Hugging Face). See docs/ort.md if you need to self-host.

Development

npm run build        # Compile to dist/
npm test             # Unit tests
npm run verify       # Lint + unit tests
npm run test:e2e     # Playwright (starts example dev server on 4173)

npm run verify (from repo root, after npm install) runs TypeScript checking and unit tests. It does not run Playwright e2e; use npm run test:e2e for that.

Examples without cd

From repo root, after npm install, npm run build, and installing example deps once:

Web component:

npm install --prefix examples/component
npm --prefix examples/component run dev

Optional: npm --prefix examples/component run dev -- --port 5173

Direct API (createSTT / createTTS):

npm install --prefix examples/direct-api
npm --prefix examples/direct-api run dev

License

MIT