
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@codexstar/pi-voice
Advanced tools
Hold-to-talk voice input for Pi CLI — Deepgram streaming STT with live transcription, voice commands, and cross-platform support
Hold-to-talk voice input for Pi.
pi-voice adds hands-free voice input to the Pi coding agent CLI. Hold SPACE to record, release to transcribe — text appears in the editor in real time via Deepgram streaming STT.
| Feature | Description |
|---|---|
| Hold-to-talk | Hold SPACE to record, release to stop — text streams into the editor live |
| Streaming transcription | Deepgram Nova 3 WebSocket — interim results appear as you speak |
| Voice commands | "hey pi, run tests", "undo", "submit", "new line", "period" |
| Continuous dictation | /voice dictate for long-form speaking without holding keys |
| Double-escape clear | Press Escape twice to clear the editor |
| Cross-platform | macOS, Windows, Linux — Kitty protocol + non-Kitty fallback |
pi install npm:@codexstar/pi-voice
brew install sox / apt install sox / choco install sox)DEEPGRAM_API_KEY env var (get $200 free credit)brew install sox # macOS
export DEEPGRAM_API_KEY="your-key-here" # add to ~/.zshrc
Then open Pi — the onboarding wizard handles the rest.
| Action | Keybinding | Notes |
|---|---|---|
| Record to editor | Hold SPACE | Release to finalize transcription |
| Toggle recording | Ctrl+Shift+V | Works in all terminals |
| Clear editor | Escape × 2 | Double-tap within 500ms |
/voice # Toggle voice on/off
/voice on # Enable voice
/voice off # Disable voice
/voice setup # Run onboarding wizard
/voice test # Test microphone + Deepgram pipeline
/voice info # Show current config and status
/voice dictate # Continuous dictation mode
/voice stop # Stop active recording or dictation
/voice history # Show recent transcriptions
Say these during recording — they're detected and executed automatically:
| Trigger | Action |
|---|---|
| "hey pi, run tests" | Inserts bun run test |
| "undo" / "undo that" | Removes last word |
| "clear" / "clear all" | Clears editor |
| "submit" / "send it" | Submits editor content |
| "new line" | Inserts \n |
| "period" / "comma" / "question mark" | Inserts punctuation |
User holds SPACE
↓
SoX captures PCM audio from microphone
↓
Audio streams to Deepgram Nova 3 via WebSocket
↓
Interim transcripts update editor in real time
↓
User releases SPACE → CloseStream → final transcript
Two terminal modes are supported:
Kitty protocol (Ghostty, Kitty, WezTerm, Windows Terminal 1.22+): True key-down/repeat/release events. First press enters warmup immediately.
Non-Kitty (macOS Terminal, older terminals): Gap-based detection. Counts rapid key-repeat events to distinguish hold from tap.
Both modes require holding for ≥800ms before recording activates. Quick taps type a normal space.
extensions/voice.ts Main extension — recording, UI, state machine
extensions/voice/config.ts Config loading, saving, migration
extensions/voice/onboarding.ts First-run setup wizard
Settings stored in Pi's settings files under the voice key:
| Scope | Path |
|---|---|
| Global | ~/.pi/agent/settings.json |
| Project | <project>/.pi/settings.json |
{
"voice": {
"version": 2,
"enabled": true,
"language": "en",
"scope": "global",
"onboarding": {
"completed": true,
"schemaVersion": 2
}
}
}
/voice test # Test full pipeline (mic + Deepgram)
| Problem | Solution |
|---|---|
| "DEEPGRAM_API_KEY not set" | export DEEPGRAM_API_KEY="your-key" in ~/.zshrc |
| "SoX error" | brew install sox (macOS) or apt install sox (Linux) |
| Space doesn't activate | Check /voice info — voice may be disabled |
| Double space in editor | Increase typing cooldown or use Ctrl+Shift+V |
See docs/troubleshooting.md for more.
See SECURITY.md for vulnerability reporting.
MIT © 2026 codexstar69
FAQs
Hold-to-talk voice input for Pi CLI — Deepgram streaming STT with live transcription, voice commands, and cross-platform support
The npm package @codexstar/pi-voice receives a total of 0 weekly downloads. As such, @codexstar/pi-voice popularity was classified as not popular.
We found that @codexstar/pi-voice demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.