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

@rksfn/voice-mode

v0.3.2

Published

Context-aware voice input for pi. Speak a request, get a formulated prompt at the cursor.

Readme

Voice Mode

Context-aware voice input for pi. Speak a coding request; a formulated prompt is inserted at the cursor. By default it waits there for review; /voice send auto submits it for you.

microphone
  → OpenRouter Whisper Large V3 Turbo, segment by segment while you speak
  → cwd, loaded context files, recent conversation, editor draft
  → GPT-5.6 Luna
  → formulated prompt inserted at the cursor, held or sent

Recording requires ffmpeg on macOS, Linux, or Windows. Transcription uses OpenRouter. The rewrite step uses OpenAI Codex when configured, otherwise OpenRouter. If Codex fails, formulation falls back to OpenRouter.

Install

pi install npm:@rksfn/voice-mode

From git:

pi install git:github.com/rksfn/voice-mode

Without installing, from this repo:

pi -e ./extensions/voice-mode/index.ts

Use

Voice input starts in tap mode:

Ctrl+Space     start recording
Ctrl+Space     stop recording

Inside pi, use /voice to change modes:

/voice tap           Ctrl+Space starts; Ctrl+Space stops
/voice hold          hold Ctrl+Space to record; release to stop
/voice off
/voice send auto     submit the formulated prompt automatically
/voice send manual   leave it in the editor for review (default)
/voice retry         re-transcribe the last take (after cancel or restart)
/voice status

hold needs a terminal with Kitty keyboard protocol support so pi receives key-release events. tap is the default and works as the fallback.

send is remembered across sessions in ~/.pi/agent/voice-mode.json; the recording mode is not and starts at tap each run. With send auto, anything already in the editor is submitted along with the formulated prompt, exactly as if you had pressed enter, so a voice note during a running turn steers that turn.

The extension:

  1. Records with ffmpeg.
  2. Transcribes with OpenRouter Whisper (pi's OpenRouter login or OPENROUTER_API_KEY) while you are still speaking: audio is cut into segments at pauses, and each segment is sent as soon as it is cut, so only the last segment is outstanding when you stop. Transient failures (502, timeouts, dropped connections) are retried automatically until the transcript is complete or you press escape.
  3. Gives the transcript, cwd, loaded context files, recent conversation, and current editor draft to GPT-5.6 Luna. If formulation fails, the raw transcript is inserted instead.
  4. Inserts the formulated prompt at the cursor, and submits it when send is auto.
  5. After you stop, the take is written to ~/.pi/agent/voice-mode-last.wav and deleted only after a clean transcription and formulation. That file is what lets retries continue after a cancel or a pi restart (/voice retry).

Configuration

VOICE_MODE_AUDIO_DEVICE=":0"               # ffmpeg input device (see below)
VOICE_MODE_STT_MODEL=openai/whisper-large-v3-turbo
VOICE_MODE_LANGUAGE=hu                     # optional ISO-639-1 hint for Whisper; auto-detected if unset

The formulated prompt stays in the transcript's language. Leave VOICE_MODE_LANGUAGE unset so Whisper detects what you speak. Pinning en makes it translate Hungarian, German, Spanish, and so on into English.

Recording picks the OS's default microphone unless VOICE_MODE_AUDIO_DEVICE is set:

  • macOS: ffmpeg -f avfoundation. Default is :0 (first listed device). List devices with ffmpeg -f avfoundation -list_devices true -i "".
  • Linux: ffmpeg -f pulse, which also works on PipeWire via pipewire-pulse. Default is default. List sources with pactl list short sources.
  • Windows: ffmpeg -f dshow, which has no built-in "default" device, so voice-mode enumerates devices and uses the first audio capture device found. List devices with ffmpeg -f dshow -list_devices true -i dummy and set VOICE_MODE_AUDIO_DEVICE to the exact device name to pick a specific one.