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

pi-say

v1.1.1

Published

Spoken output for pi: a say tool that speaks short sentences through local TTS (Kokoro/Piper HTTP server, macOS say, or espeak-ng).

Readme

pi-say

Spoken output for pi: a say tool that turns short sentences into speech.

Give pi a voice. The model calls say for acks before slow work and for the final result:

"Checking the logs now." … "Found three failed requests."

Google Cloud TTS is used when credentials are available, with local fallback (Kokoro/Piper server, macOS say, or espeak-ng) so speech keeps working offline.

Install

pi install npm:pi-say
# or from git
pi install git:github.com/matifema/pi-say
# or try without installing
pi -e npm:pi-say

Restart pi (or start a new session) after installing.

Google Cloud TTS

Provide credentials in one of these ways:

  • API key: set PI_SAY_GOOGLE_API_KEY (or VOICECTL_GOOGLE_API_KEY, or GOOGLE_API_KEY)
  • Service account JSON: set GOOGLE_APPLICATION_CREDENTIALS, or drop the file at ~/.config/pi-say/google-sa.json (voicectl's ~/.config/voicectl/google-sa.json is also picked up)

The Cloud Text-to-Speech API must be enabled on the project. Without credentials, pi-say silently falls back to the local engines below.

Voice

Change the voice from pi in two ways:

  • Ask pi in plain language — the model calls say_voice for you
  • Type /voice <name> in the pi prompt (/voice shows the current settings, /voice list lists Google voices)

Examples:

/voice en-US-Chirp3-HD-Aoede
/voice en-US-Journey-O
/voice local
/voice speed 1.15

Settings persist in ~/.config/pi-say/config.json:

{
  "engine": "auto",
  "voice": "en-US-Chirp3-HD-Charon",
  "speed": 1.0
}

engine is one of auto (Google, then local, then espeak), google, local, or espeak.

Local fallback

auto mode tries these in order:

  1. Google Cloud TTS — when credentials are configured
  2. Local HTTP TTS — any server exposing POST /tts with { text, voice, speed } returning audio (Kokoro, Piper, voicectl, …); default http://127.0.0.1:8181
  3. macOS say — built in
  4. espeak-ng / espeak — install with your package manager

Playback uses a voicectl-style HUD unix socket when present, otherwise pw-play, paplay, aplay, or ffplay (afplay on macOS).

Environment variables

Everything is optional; values in ~/.config/pi-say/config.json (written by /voice and say_voice) take precedence. VOICECTL_* aliases remain supported for compatibility with voicectl.

| Variable | Default | Description | | --- | --- | --- | | PI_SAY_GOOGLE_API_KEY | — | Google Cloud TTS API key. | | PI_SAY_GOOGLE_SA / GOOGLE_APPLICATION_CREDENTIALS | auto-discovered | Service account JSON path. | | PI_SAY_ENGINE | auto | auto, google, local, or espeak. | | PI_SAY_VOICE | en-US-Chirp3-HD-Charon | Voice name. | | PI_SAY_SPEED | 1.0 | Speaking rate. | | PI_SAY_TTS_URL | http://127.0.0.1:8181 | Local TTS server. Set to off to skip it. | | PI_SAY_HUD_SOCKET | $XDG_RUNTIME_DIR/voicectl.sock | HUD socket that accepts {"cmd":"speak","file":…,"interrupt":…}. | | PI_SAY_PLAYER | auto | Force a player command, e.g. aplay. | | PI_SAY_TIMING_LOG | $XDG_RUNTIME_DIR/pi-say-timing.jsonl | JSONL latency log; failures are silent. |

How it works

  1. Text is clipped to twelve words.
  2. Synthesis: Google Cloud TTS → local HTTP TTS → macOS say → espeak-ng.
  3. Playback: HUD socket → pw-play / paplay / aplay / ffplay (afplay on macOS).

Generated WAVs are cached under ~/.cache/pi-say/.

License

MIT