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

voice-js-lite-by-ashish

v1.0.1

Published

Lightweight voice command library for the browser

Readme

🎤 Voice JS Lite

Voice JS Lite is a lightweight JavaScript library that lets you control your website using voice commands.

It is designed for:

  • Speed
  • Simple setup
  • Internal tools
  • Reducing repeated clicking (submit, next, save, etc.)

✨ Features

  • Voice command detection in the browser
  • Simple API (on, start, stop)
  • Unlimited custom commands
  • Continuous listening
  • No external dependencies
  • Works with any frontend (Vanilla JS, React, Next.js)

📁 Project Structure


voice-js/
├─ src/
│  └─ index.js
├─ test.html
├─ package.json
└─ README.md

🚀 How to Run

Voice recognition requires a local server.

Option 1: VS Code

  • Install Live Server
  • Open the project folder
  • Right-click test.html
  • Click Open with Live Server

Option 2: Node.js

npx serve .

Then open:

http://localhost:3000/test.html

🧠 Basic Usage

Import

import Voice from "./src/index.js";

Create instance

const voice = new Voice();

Register commands

voice.on("submit", () => {
  console.log("Submit command triggered");
});

voice.on("login", () => {
  console.log("Login command triggered");
});

Start listening (required user action)

voice.start();

🗣 How Commands Work

The library uses partial matching.

Examples:

  • Saying "submit form" → triggers submit
  • Saying "please login" → triggers login

This makes voice commands flexible and fast.


🛑 Stop Listening

voice.on("stop", () => {
  voice.stop();
});

📚 API

new Voice(options)

new Voice({ lang: "en-US" });

| Option | Description | Default | | ------ | ------------------------------- | ------- | | lang | Language for speech recognition | en-US |


voice.on(command, callback)

Register a voice command.

voice.on("save", () => {});

voice.off(command)

Remove a command.

voice.off("save");

voice.start()

Start voice recognition ⚠️ Must be called after a user interaction (click, tap).


voice.stop()

Stop listening.


🌐 Browser Support

  • Chrome ✅
  • Edge ✅
  • Brave ✅
  • Firefox ❌ (not supported)

🔐 Permissions

Microphone access is required. You must allow it when the browser asks.


🧪 Debugging

Open browser DevTools → Console.

You will see logs like:

HEARD: submit

📄 License

MIT License Free to use and modify.


👤 Author

Built for learning, fun, and productivity.


---

If you want, next I can help you:
- Make it **npm publish–ready**
- Write a **short README** version
- Add **examples section**
- Convert README to **professional open-source style**

Just tell me what’s next 👌