MCPcopy Index your code
hub / github.com/TalAter/annyang

github.com/TalAter/annyang @v3.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.0 ↗ · + Follow
34 symbols 74 edges 10 files 0 documented · 0% 7 cross-repo links updated 30d agov3.0.0 · 2026-03-11★ 6,81910 open issues

Browse by type

Functions 30 Types & classes 4
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

annyang!

A tiny JavaScript Speech Recognition library that lets your users control your site with voice commands.

annyang has no dependencies, weighs just 2 KB, and is free to use and modify under the MIT license.

Demo and Tutorial

Play with some live speech recognition demos

FAQ, Technical Documentation, and API Reference

Install

npm install annyang

Hello World

It's as easy as installing annyang and defining the commands you want.

ESM (recommended)

import annyang from 'annyang';

if (annyang.isSpeechRecognitionSupported()) {
  // Let's define a command.
  const commands = {
    'hello': () => { alert('Hello world!'); },
    'search for *term': (term) => { console.log(`Searching for ${term}`); },
  };

  // Add our commands to annyang
  annyang.addCommands(commands);

  // Start listening.
  annyang.start();
}

Named imports

import { addCommands, start, isSpeechRecognitionSupported } from 'annyang';

if (isSpeechRecognitionSupported()) {
  addCommands({ 'hello': () => { alert('Hello world!'); } });
  start();
}

CommonJS

const annyang = require('annyang');

Script tag (IIFE)

<script src="https://github.com/TalAter/annyang/raw/v3.0.0/dist/annyang.iife.min.js"></script>
<script>
if (annyang.isSpeechRecognitionSupported()) {
  // Let's define a command.
  const commands = {
    'hello': () => { alert('Hello world!'); }
  };

  // Add our commands to annyang
  annyang.addCommands(commands);

  // Start listening.
  annyang.start();
}
</script>

Check out some live speech recognition demos and advanced samples, then read the full API Docs.

Adding a GUI

You can easily add a GUI for the user to interact with Speech Recognition using Speech KITT.

Speech KITT makes it easy to add a graphical interface for the user to start or stop Speech Recognition and see its current status. KITT also provides clear visual hints to the user on how to interact with your site using their voice, providing instructions and sample commands.

Speech KITT is fully customizable and comes with many different themes, and instructions on how to create your own designs.

Speech Recognition GUI with Speech KITT

For help with setting up a GUI with KITT, check out the Speech KITT page.

Author

Tal Ater: @TalAter

License

Licensed under MIT.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 30
Interface 4

Languages

TypeScript100%

Modules by API surface

src/annyang.ts30 symbols
test/specs/annyang.test.ts2 symbols
test-manual/esm-app.js1 symbols
test-manual/cjs-app.js1 symbols

Dependencies from manifests, versioned

@types/dom-speech-recognition0.0.7 · 1×
concurrently9.2.1 · 1×
corti2.1.0 · 1×
eslint10.0.2 · 1×
prettier3.8.1 · 1×
tsup8.5.1 · 1×
typedoc0.28.17 · 1×
typescript5.9.3 · 1×
typescript-eslint8.56.1 · 1×
vitest4.0.18 · 1×

For agents

$ claude mcp add annyang \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page