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

ai-tts

v1.2.0

Published

AI audio content creation CLI — stories, podcasts, narration, and dubbing with TTS

Readme

ai-tts

AI audio content creation CLI — stories, podcasts, narration, and TTS synthesis.

Quick Start

# Synthesize a single sentence
npx ai-tts say "你好世界"

# Output as MP3 (smaller file size)
npx ai-tts say "你好世界" --format mp3

# Generate a story with TTS narration
npx ai-tts story --topic "三只小猪"

# Browse available voices
npx ai-tts voices --search "温柔"

A browser window will open for login on first use. After that, your token is cached automatically.

Install

npm install -g ai-tts

Commands

ai-tts say <text> / ai-tts synthesize <text>

Synthesize a single text snippet to audio.

ai-tts say "你好世界"
ai-tts say "你好世界" --format mp3
ai-tts synthesize "Welcome" --voice v-male-Bk7vD3xP --format mp3
ai-tts say "快速测试" --speed 1.5 --volume 0.8 --pitch 2

| Flag | Default | Description | |------|---------|-------------| | <text> | (required) | Text to synthesize (positional or --text) | | --voice <id> | v-female-R2s4N9qJ | TTS voice ID | | --format <fmt> | pcm | Output format: pcm (WAV), wav, mp3 | | --speed <n> | 1.0 | Speed 0.5-2.0 | | --volume <n> | 1.0 | Volume 0.1-2.0 | | --pitch <n> | 0 | Pitch -12 to 12 | | --output <path> | ./tts-<timestamp>.wav | Output file path |

ai-tts narrate [options]

Narrate a document, text, or script to multi-segment audio.

ai-tts narrate --input article.txt
ai-tts narrate --input article.txt --format mp3
ai-tts narrate --input readme.md --voice v-male-Bk7vD3xP
ai-tts narrate --text "第一段。第二段。第三段。"
ai-tts narrate --script narration-script.json
echo "Hello world" | ai-tts narrate

| Flag | Default | Description | |------|---------|-------------| | --input <file> | | Input .txt or .md file | | --text <text> | | Inline text to narrate | | --script <file> | | JSON script with per-segment voice control | | --voice <id> | v-female-R2s4N9qJ | Default voice ID | | --format <fmt> | pcm | Output format: pcm (WAV), wav, mp3 | | --speed <n> | 1.0 | Speed 0.5-2.0 | | --silence <sec> | 0.8 | Silence between segments 0-5.0 | | --output <path> | ./narration-<timestamp>.wav | Output file path |

Script JSON format (per-segment voice/speed control):

{
  "segments": [
    { "text": "第一段内容", "voiceId": "v-female-R2s4N9qJ", "speed": 1.0 },
    { "text": "第二段内容", "voiceId": "v-male-Bk7vD3xP", "speed": 0.8 }
  ],
  "silence": 1.0,
  "output": "my-narration.wav"
}

ai-tts voices [options]

Browse and filter available TTS voices (no login required).

ai-tts voices
ai-tts voices --search "温柔" --gender female
ai-tts voices --language en --extended
ai-tts voices --json

| Flag | Default | Description | |------|---------|-------------| | --search <query> | | Search by name, tone, style | | --gender <m\|f> | | Filter by gender | | --language <code> | | Filter by language: zh, en, etc. | | --extended | false | Include extended voice library (380+) | | --json | false | Output raw JSON |

ai-tts story [options]

Generate a story with AI and synthesize TTS audio.

ai-tts story --topic "小红帽的故事"
ai-tts story --topic "太空探险" --paragraphs 8 --speed 0.8

| Flag | Default | Description | |------|---------|-------------| | --topic <text> | Children's story | Story prompt | | --voice <id> | v-female-R2s4N9qJ | TTS voice ID | | --output <path> | ./story-<timestamp>.wav | Output WAV file | | --paragraphs <n> | 5 | Number of paragraphs (1-20) | | --speed <n> | 1.0 | Speed (0.5-2.0) | | --silence <sec> | 0.8 | Silence between paragraphs (0-5.0) |

ai-tts podcast [options]

Generate a multi-speaker podcast dialogue.

ai-tts podcast --topic "AI趋势" --exchanges 10
ai-tts podcast --topic "科技新闻" --style casual --length long

| Flag | Default | Description | |------|---------|-------------| | --topic <text> | Tech trends | Podcast topic | | --style <style> | professional | Dialogue style | | --length <len> | medium | short / medium / long | | --exchanges <n> | 8 | Number of exchanges (2-30) | | --output <path> | ./podcast-<timestamp>.wav | Output WAV file | | --speed <n> | 1.0 | Speed (0.5-2.0) | | --silence <sec> | 0.5 | Silence between segments (0-5.0) |

ai-tts login / logout / status / dashboard

ai-tts login       # Open browser to login via email OTP
ai-tts logout      # Clear cached token
ai-tts status      # Show login status and token info
ai-tts dashboard   # Open Web dashboard in browser

Authentication

AI-TTS uses browser-based email OTP login (Supabase):

  1. CLI starts a temporary local HTTP server
  2. Opens your browser to the login page
  3. You enter your email and verification code
  4. Browser redirects back to the CLI with your token
  5. Token is cached at ~/.config/ai-tts/token.json

Quota

  • Free tier: 100 quota per day
  • say/synthesize: 1 quota per call
  • narrate: 1 quota per segment
  • story: ~6-8 quota (1 LLM + N TTS)
  • podcast: ~10-20 quota
  • voices: free (no quota)
  • Quota resets daily

Requirements

  • Node.js >= 18.0.0

License

UNLICENSED - All rights reserved.