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

opencode-tts

v2.0.0

Published

OpenCode plugin that speaks short AI summaries instead of full responses

Readme

opencode-tts

An OpenCode plugin that automatically speaks assistant responses when a session goes idle.

https://github.com/user-attachments/assets/cf1c3166-dbd7-43b8-8215-1ea12d336463

How it works

The plugin listens for session idle events and automatically:

  1. Captures the latest assistant message
  2. Either summarizes it (default) or uses the full text (configurable)
  3. Converts it to speech using a local TTS engine

Install

Tell OpenCode:

Install plugin opencode-tts

Or add to your OpenCode config (~/.config/opencode/opencode.json):

{
  "plugin": ["opencode-tts"]
}

Modes

  • summary (default): Auto-speaks a summarized version of each response
  • full: Auto-speaks the complete response text

User controls

Use these slash commands to manage TTS behavior:

| Command | Effect | | --- | --- | | /tts-mode-summary | Switch to summary mode (default) | | /tts-mode-full | Switch to full text mode | | /tts-on | Enable automatic TTS | | /tts-off | Disable automatic TTS | | /tts-speak <text> | Speak arbitrary text immediately | | /tts-repeat | Re-speak the last response in the current session | | /tts-uninstall | Remove plugin files and clean up opencode.json |

Mode and status changes persist across sessions.

Configuration

Plugin settings live in ~/.config/opencode/plugins/opencode-tts.jsonc:

{
  "enabled": true,          // false to disable TTS — persisted across sessions
  "mode": "summary",        // "summary" | "full" — persisted across sessions
  "debug": false,
  "backend": "edge_tts",    // "edge_tts" | "say"
  "voice": "...",           // voice override for the active backend
  "summaryLength": "2 sentences", // free-text length hint passed to the LLM (e.g. "30 words", "3 short sentences")
  "summaryProvider": "...", // provider ID for the summary model
  "summaryModel": "...",    // model ID for the summary model
  "edge_tts": {
    "voice": "en-US-AvaNeural",
    "rate": "+25%",
    "volume": "+0%"
  }
}

The plugin auto-installs edge-tts into a managed Python venv at ~/.config/opencode/tts-venv on first use.

Summary model

The plugin resolves the model for summary generation in this order:

  1. summaryProvider + summaryModel from the plugin config
  2. small_model from your OpenCode config
  3. The same model that produced the assistant response
  4. Text fallback: first 40 words of the raw response

TTS backends

edge_tts (default): Uses Microsoft Edge's neural TTS. Auto-installed. Requires an audio player: afplay (macOS built-in), ffplay, or mpg123.

The default voice is en-US-AvaNeural, which is recommended for English. Edge TTS supports a wide range of languages and locales — you can use any multilingual voice (e.g. en-US-AvaMultilingualNeural) or switch to a completely different language (e.g. it-IT-ElsaNeural for Italian, fr-FR-DeniseNeural for French). Run edge-tts --list-voices to see all available voices.

say: Uses macOS say or Linux spd-say/espeak. No install needed.

To use a custom edge-tts executable:

{
  "edge_tts": {
    "command": ["python3", "-m", "edge_tts"]
  }
}

Local development

Build:

npm install
npm run build

Checkout and point to local plugin:

{
  "plugin": ["file:///path/to/opencode-tts/dist/index.js"]
}