pi-voice README

The project's README from github.com/earendil-works/pi-voice. As one markdown file: README.md.

Pi Voice

Local speech-to-text for Pi.

Press a keyboard shortcut, talk, and the resulting transcript will be put directly into your chat.

Install

Install the npm package:

pi install npm:@earendil-works/pi-voice

If you prefer being on the development tip, you can install from GitHub:

pi install ssh://[email protected]/earendil-works/pi-voice

Usage

The extension registers:

/transcribe remains available as a compatibility alias for /voice-settings.

Upgrading from pi-transcribe

It's recommended to install Pi Voice via NPM. If you have an older install of pi-transcribe uninstall it via:

pi remove git:github.com/earendil-works/pi-transcribe

If you installed it into a project with -l, run pi remove -l git:github.com/earendil-works/pi-transcribe from that project instead. Then install Pi Voice with:

pi install npm:@earendil-works/pi-voice

File transcription and FFmpeg

The agent can call transcribe_file for local audio or video files. Decoded audio is limited to 512 MiB (about 2.3 hours). File decoding requires the ffmpeg executable. Install FFmpeg with your system package manager if you don't already have it installed

# macOS with Homebrew
brew install ffmpeg

# Debian or Ubuntu
sudo apt install ffmpeg

# Windows with winget
winget install Gyan.FFmpeg

If FFmpeg is installed outside PATH, point Pi Voice at it before starting Pi:

export PI_VOICE_FFMPEG_PATH=/path/to/ffmpeg

The legacy PI_TRANSCRIBE_FFMPEG_PATH variable remains supported when PI_VOICE_FFMPEG_PATH is not set.

When FFmpeg is unavailable, transcribe_file reports platform-specific guidance to the agent. The agent should ask before running a package-manager command. Model setup is still explicit: run /voice-settings once in the interactive TUI to choose and, after confirmation, download a local model.

Keeping transcribe_file out of the context

To keep transcribe_file out of the model's tool list and the codemode description while leaving it discoverable and callable, set transcribeFileExposure in ~/.pi/agent/pi-voice.json from "direct" to "deferred" once /voice-settings has run (add the key if the file predates it):

"transcribeFileExposure": "deferred"

Applies on the next start or /reload. Scripts find it with searchTools() when codemode is enabled ("defaultTools": ["+codemode"]), and tool_search can load it if enabled. Requires Pi 0.99.2 or later; older Pi ignores it. Resuming a session started before the change keeps the tool declared in that session.

Developing & Building Pi Voice

To develop or run it from a checkout:

git clone [email protected]:earendil-works/pi-voice.git
cd pi-voice
npm install --ignore-scripts
pi -e .

If you want to be able to re-run onboarding you can enable the debug env var when starting Pi. This enables the /voice-onboarding command.

PI_VOICE_DEBUG=1 pi -e /absolute/path/to/pi-voice

pi-voice (earendil-works/pi-voice)

Searching Database…

What is this?A speech-to-text extension for the Pi coding agent: you hit a shortcut, speak, and the transcript is inserted at your editor cursor. Everything is transcribed locally on your machine.
Is this a separate app, or does it plug into something?It plugs into Pi as an extension, not a standalone app. It adds a recording shortcut, a /transcribe command for settings, and a transcribefile tool the agent can call on local audio or video files.
How do I set it up?Install it directly from GitHub (an npm release is planned), then run /transcribe once in Pi's interactive TUI to pick a model and download it after your confirmation.
What do I need installed besides the extension itself?Node.js 22 or newer. FFmpeg is only needed for transcribing audio and video files — microphone dictation works without it; if FFmpeg sits outside PATH, you can point pi-transcribe at it before starting Pi.
Can I start recording from any app on my system?No — the shortcut is a Pi terminal binding, not a global OS hotkey, so recording only starts while Pi has focus.
Does my voice leave my machine?No: audio is transcribed locally with a model you downloaded after confirming in the TUI. The only network step is that one-time model download.
Can the agent transcribe audio files by itself?Yes, through its transcribefile tool. Jobs share one loaded model, mic dictation is prioritized after any active job finishes, and at most two file jobs run at once with a single FFmpeg decoder and a 128 MiB (about 35 minutes) decode cap.
Do all models transcribe while you are still speaking?No — streaming-capable models process roughly 500 ms chunks during recording, while other models transcribe the complete recording only after you stop.
Is there a way to replay the setup flow if something goes wrong?Yes, but it is debug-only: start Pi with PITRANSCRIBEDEBUG=1 and run /transcribe-onboarding. Canceling before selecting a model leaves your current configuration unchanged.
Size
1.5 MB
Stars
326
Updated
CommitNov 11
Age
3mo
Commits · 90 Days