@igpauli/pi-sano-tts

Batteries-included local multilingual MoE Text-to-Speech with acoustic classifier, audible calibration testing, router-in-the-weights, and calibrated LoRA personas for Pi

Packages

Package details

extension

Install @igpauli/pi-sano-tts from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@igpauli/pi-sano-tts
Package
@igpauli/pi-sano-tts
Version
2.4.5
Published
Sep 21, 2026
Downloads
2,261/mo · 2,261/wk
Author
igpauli
License
GPL-3.0-or-later
Types
extension
Size
14.8 MB
Dependencies
1 dependency · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.js"
  ]
}

Security note

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

README

pi-sano-tts 🗣️

100% local, batteries-included Multilingual Mixture of Experts (MoE) Text-to-Speech extension for the Pi Coding Agent (@earendil-works/pi-coding-agent), powered by sanoTTS WebAssembly and ELD (Efficient Language Detector).

Synthesizes assistant responses locally with zero cloud dependencies and no manual language micro-management. By default, it automatically routes every sentence to its fastest real-time model.


Batteries Included: Knobs & Presets

Instead of manually pinning languages, the MoE router dynamically detects languages in ~0.15 ms via ELD. You only choose between two simple presets:

  • fast (DEFAULT):
    • Selects the fastest real-time or faster model for every language (all quantized to INT8 Q8, ~500 KB per voice):
      • 🇺🇸 English $\to$ Heartnano INT8 (24kHz)15.1x real-time (362ms) (344 KB)
      • 🇧🇷 Portuguese $\to$ PT-Tiny 512k Q81.02x real-time (509 KB)
      • 🇪🇸 Spanish $\to$ Spanish-Tiny 510k Q81.05x real-time (507 KB)
      • 🇩🇪 German $\to$ German-Tiny 510k Q81.05x real-time (509 KB)
      • 🇮🇹 Italian $\to$ Italian-Tiny 510k Q81.05x real-time (509 KB)
      • 🇨🇿 Czech $\to$ Czech-Tiny 510k Q81.05x real-time (510 KB)
      • 🇷🇴 Romanian $\to$ Romanian-Tiny 510k Q81.05x real-time (508 KB)
      • 🇷🇺 Russian $\to$ Russian-Tiny 510k Q81.05x real-time (509 KB)
      • 🇹🇷 Turkish $\to$ Turkish-Tiny 510k Q81.05x real-time (507 KB)
      • 🇫🇷 French $\to$ French 1.57M Q8 (1.55 MB)
  • 💎 quality:
    • High-fidelity studio models (Heart 2.27M Q8 for English at 3.1x, Portuguese 1.57M Q8 native studio, French 1.57M Q8).

Installation & Updates in Pi

Install via Pi's package manager:

pi install npm:@igpauli/pi-sano-tts

To update to the latest release at any time:

pi update npm:@igpauli/pi-sano-tts

Requires a Linux audio player (pw-play or mpv) and Node.js >= 20.


Commands

In your Pi session:

/tts on              # Enable automatic speech after assistant responses
/tts off             # Disable automatic speech
/tts stop            # Stop currently playing audio immediately

/tts fast            # Switch to FAST preset (default: Heartnano 15x, Real-time Tiny models)
/tts quality         # Switch to QUALITY preset (Hi-Fi studio models)

/tts speak <text>    # Speak custom text through the active pipeline

Architecture

[ LLM Token Stream (message_update) ]
                 │
                 ▼
        [ SentenceStreamer ]
  - Clause boundary & punctuation segmentation
  - Markdown, tags & code block stripping
  - Decimal & ticker preservation
                 │
                 ▼ (Sentence Queue)
  [ Stage 1: WASM Synthesis Worker ]
  - ELD n-gram language detection (~0.15ms)
  - Preset Dispatcher: fast (INT8 / Tiny) vs quality (Hi-Fi)
  - Zero-copy Buffer transfer
                 │
                 ▼
  [ Stage 2: Vocal DSP Mastering (<5ms) ]
  - High-pass 75Hz filter (eliminates sub-bass rumble)
  - 220Hz Warmth (+1.8dB) & 2.8kHz Clarity (+2.2dB) EQ
  - Anti-aliasing low-pass filter
  - Smooth polynomial soft-saturation
  - Broadcast peak normalization (-0.8 dB target)
  - 3ms Hann-window anti-click crossfade
                 │
                 ▼ (Ready WAV Queue)
  [ Stage 3: PipeWire Playback ]
  - Background audio playback via pw-play

License & Compliance

  • Package License: GPL-3.0-or-later (due to bundled snt_g2p phonemizer from eSpeak-ng).
  • Inference Runtime & Kernels: MIT (adapted from Vocos/VITS architectures).
  • Language Detection: Apache-2.0 (ELD).
  • Model Weights: Distilled from Kokoro (Apache-2.0) and Piper (MIT) teachers by Ampixa Labs.