@swairshah/pi-talk

Text-to-speech extension for Pi coding agent using Loqui

Packages

Package details

extension

Install @swairshah/pi-talk from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@swairshah/pi-talk
Package
@swairshah/pi-talk
Version
1.2.2
Published
Mar 14, 2026
Downloads
49/mo · 6/wk
Author
swairshah
License
MIT
Types
extension
Size
27.1 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-talk

Text-to-speech extension for Pi coding agent. Gives Pi a voice using <voice> tags.

pi-talk demo

Features

  • Local TTS - No cloud APIs, runs entirely on your Mac
  • Multiple voices - 7 different voice options
  • Central playback - Pi sends speech jobs to Loqui's local broker queue
  • Configurable - Toggle verbosity, mute, change voices

Requirements

Loqui.app must be installed and running (provides the TTS server + local broker queue).

brew install swairshah/tap/loqui

Then launch Loqui from Applications - it runs in the menubar.

Installation

pi install npm:@swairshah/pi-talk

Usage

Once installed, Pi will automatically speak <voice> tagged content in its responses.

Commands

Command Description
/tts Toggle TTS on/off
/tts-mute Mute audio (keeps voice tags in responses)
/tts-voice <name> Change voice (alba, marius, javert, fantine, cosette, eponine, azelma)
/tts-style Toggle between succinct and verbose voice prompts
/tts-say <text> Speak arbitrary text
/tts-stop Stop current speech
/tts-status Show current status

Global Shortcut

Press Cmd+. to stop speech at any time (requires Loqui.app running).

How it works

  1. The extension injects a system prompt that teaches Pi to use <voice> tags
  2. When Pi responds, the extension extracts <voice> content
  3. The extension sends speech jobs to Loqui's local broker (127.0.0.1:18081), including sourceApp, sessionId, and pid
  4. Loqui schedules per-session queues and plays audio centrally (no cloud, no API keys)

Publishing (maintainers)

From repo root:

./scripts/publish-pi-talk.sh --dry-run
./scripts/publish-pi-talk.sh --bump patch

Or from this directory:

npm run pack:preview
npm run publish:npm

Credits

License

MIT