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

yomiscript

v0.1.6

Published

YomiScript CLI: speak YomiScript with a Katarite

Readme

yomiscript

yomiscript speaks YomiScript with a Katarite: Kokoro-82M by default, with the fp32 models, which are identical to the original Kokoro (D21, D22, D24). The YomiScript is checked before any model is loaded, and a parse error prints the parser's message.

yomiscript speak "ja /kʲoː<t:今日> wa<t:は> ‖<t:、> ame<t:雨> desɯ<t:です。> ↘/"     # play it
yomiscript speak --out hello.wav "en-US /ˈhɛ.loʊ<t:Hello,> ‖ ˈwɝld<t: world.> ↘/"
echo "ja /ame ↘/" | yomiscript speak                                                 # from stdin
yomiscript speak --file utterance.ys --model w16
yomiscript instructions        # how to write YomiScript: paste it into an LLM's prompt

| option | | |---|---| | --out FILE.wav | write the audio instead of playing it (--play to do both) | | --katarite NAME | kokoro (default) or supertonic (needs <t:…>; models: see below) | | --model fp32\|w16 | Kokoro weights: fp32 (default) or w16 (fp16 weights, what the browser uses) | | --models DIR | Kokoro models in this directory (models/{enc,f0n,dec}[_w16].onnx, voices/*.bin), not downloaded | | --no-accent | Kokoro: no Japanese dictionary accent (Kokoro's own pitch everywhere, as the original Kokoro) | | --no-pitch | Kokoro: the dictionary accent's Japanese values instead of the predicted pitch (D33) | | --file FILE | read the YomiScript from a file (- = stdin) |

Exit codes: 0 done, 1 the YomiScript or the synthesis failed, 2 the command line is wrong. The text and the timing go to stderr, for example 一日から三日まで休みです。 (2.90 s of audio in 1.21 s, kokoro).

Playback: afplay on macOS, paplay then aplay on Linux. Anywhere else, the audio is written to a temporary WAV and its path is printed.

Models

The models are not in the npm package. The first time something is spoken, the files it needs are downloaded into a cache and read from there afterwards (the progress goes to stderr):

  • Kokoro: from receptron/yomiscript-kokoro into ~/.cache/yomiscript/kokoro (fp32: 325 MB, plus 0.5 MB per voice). A directory given with --models or $YOMISCRIPT_MODELS is used as it is, with no download; in this repository YOMISCRIPT_MODELS=demo/ys_web works once the demo's models are exported (demo/ys_web/README.md).
  • The Japanese accent dictionary (Kokoro, D25, @yomiscript/ja-accent): from receptron/yomiscript-ja-dict into ~/.cache/yomiscript/ja-dict/jpreprocess-0.15.0 (28 MB) the first time Japanese is spoken; $YOMISCRIPT_JA_DICT is used as it is. With it, the accent phrases the dictionary reads the same way as the YomiScript get the dictionary's accent (at half the rules' strength), which is the starting point of the pitch model below; with --no-pitch everything else keeps Kokoro's own pitch. If it cannot be loaded, Kokoro's own pitch is used and stderr says so.
  • The Japanese pitch model (Kokoro, D33, @yomiscript/ja-accent, CC BY-SA 4.0): from receptron/yomiscript-ja-pitch into ~/.cache/yomiscript/ja-pitch/qwen-2 (8 MB) the first time Japanese is spoken; $YOMISCRIPT_JA_PITCH is used as it is. It predicts the values of every mora from the dictionary's accent and the text. If it cannot be loaded, the dictionary accent is used and stderr says so.
  • Supertonic: $YOMISCRIPT_SUPERTONIC as it is; otherwise the Python SDK's cache ~/.cache/supertonic3 if it has the models; otherwise from Supertone/supertonic-3 into ~/.cache/yomiscript/supertonic (380 MB). Its weights are under OpenRAIL-M, with use-based restrictions.

npm may warn that it did not run onnxruntime-node's install script ("allow-scripts"). The CPU runtime, which is what yomiscript uses, is in the package itself, so the warning can be ignored; the script only fetches the CUDA (GPU) libraries on Linux x64.

As a library

yomiscript also exports what the Node apps share (runtime.ts): openKatarite(name, opts) (the Katarites by name; a new one plugs into KATARITES), modelsDir, kokoroSource, supertonicSource, writeWav, toWav, playWav and originalText. The MCP server uses them.