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

mia-narrative

v1.0.10

Published

Text-to-speech CLI for narrative audio generation

Readme

🎙️ mia-narrative CLI

Transform your text into expressive audio narratives. Choose between professional narrators, adjust their tone and pace, add ambient effects—all from your command line. No recording equipment needed.

What You Can Do

🎭 Meet the Voices

  • Mia: Professional, technical content expert
  • Miette: Conversational, warm British charm
  • Seraphine & Echo: Expressive storytellers
  • Jeremy & Atlas: Confident male narrators
  • ResoNova & Zephyr: Unique, experimental voices

💨 Shape Your Audio

  • Adjust speech speed (0.5x - 2.0x)
  • Change pitch and tone
  • Add reverb, echo, or compression effects
  • Insert natural pauses at sentence boundaries

🔌 Multiple Engines

  • System: Your OS's built-in voice (quick, no setup)
  • Piper: Private, local, open-source (best control)
  • ElevenLabs: Cloud-based, premium quality (requires API key)

Installation

Prerequisites

  • Node.js v18+
  • FFmpeg (for audio processing)
  • Piper (optional, for better voices)

Get Started

git clone <repo>
cd cli
npm install
npm run build
npm link  # Makes 'mia-narrative' available globally

Optional: Setup Professional Voices

npm run setup
# Automatically downloads Piper models (one-time, ~380MB)

Optional: ElevenLabs (Cloud Voices)

Get an API key from elevenlabs.io:

export ELEVENLABS_API_KEY="your_key_here"
mia-narrative g -E elevenlabs -T "Hello" -O output.mp3

Quick Start

Simplest command (uses system voice):

mia-narrative g -T "Hello, world!"

With a specific voice (Miette with British accent):

mia-narrative g -E piper -v miette -T "What a lovely day!" -O story.mp3

From a text file with effects:

mia-narrative g -E piper -v mia -F chapter.txt --pitch 1.1 --speed 0.95 -O chapter.mp3

Professional narrator with full effects:

mia-narrative g \
  -E piper \
  -v mia \
  -F narrative.txt \
  --pitch 1.0 \
  --speed 0.9 \
  --reverb 0.3 \
  --compression 0.4 \
  -O final.mp3

Command & Option Reference

  • g = short for generate command
  • -E, --engine = which TTS engine (piper, elevenlabs, system)
  • -v, --voiceId = which narrator (mia, miette, seraphine, jeremy, etc.)
  • -T, --text = text to speak
  • -F, --file = read from file instead
  • -O, --output = where to save (default: output.mp3)

Explore Voices

See which narrators are available:

# See system voices (quick, no setup)
mia-narrative voices --engine system

# See Piper personalities (download models first)
mia-narrative voices --engine piper

# See ElevenLabs options (requires API key)
mia-narrative voices --engine elevenlabs

Output shows voice ID, personality, and which model it uses.

Setup Piper (Optional)

Get access to professional voices with full control:

npm run setup
# Downloads Mia, Miette, Seraphine, Jeremy, ResoNova, Zephyr, Echo, Atlas

Audio Parameters

| Parameter | Range | Default | Effect | |---------------|-----------|---------|------------------| | speed | 0.5-2.0 | 1.0 | Speech rate | | pitch | 0.5-2.0 | 1.0 | Tonal height | | volume | 0.0-1.0 | 0.8 | Loudness | | emphasis | 0.0-1.0 | 0.5 | Dramatic intensity | | reverb | 0.0-1.0 | 0.2 | Spatial acoustics| | echo | 0.1-2.0 | 0.1 | Delay effect | | compression | 0.0-1.0 | 0.3 | Dynamic range | | pause | 0.1-2.0s | 0.5 | Break timing |

Environment Variables

| Variable | What it does | |----------|-------------| | ELEVENLABS_API_KEY | Your API key for cloud voices | | MIA_NARRATIVE_PIPER_PATH | Custom path to Piper binary (if not in PATH) | | DEBUG | Set to 1 for verbose output |

Troubleshooting

| Issue | Fix | |-------|-----| | FFmpeg not found | brew install ffmpeg (Mac) or apt-get install ffmpeg (Linux) | | Piper not found | Install from github.com/rhasspy/piper | | Voices not available | Run npm run setup to download Piper models | | API errors with ElevenLabs | Check your ELEVENLABS_API_KEY is set correctly |

Contributing & Development

npm run build    # Compile TypeScript
npm run dev -- g -T "test"  # Run in dev mode
npm test         # Run tests