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

@fionoble/tts-cli

v1.0.2

Published

CLI tool for OpenAI text-to-speech, with a Claude Code skill

Readme

@fionoble/tts-cli

A CLI tool for generating speech using OpenAI's TTS API. Comes with a Claude Code skill for seamless AI-assisted speech generation.

Install

npm install -g @fionoble/tts-cli

Or use without installing:

npx @fionoble/tts-cli -t "Hello world" -o hello.mp3

Prerequisites

export OPENAI_API_KEY="sk-..."

Environment Variables

| Variable | Description | |----------|-------------| | OPENAI_API_KEY | Required. Your OpenAI API key. | | OPENAI_BASE_URL | Custom API base URL (for proxies). | | TTS_VOICE | Default voice. Overridden by -v flag. | | TTS_MODEL | Default model. Overridden by -m flag. | | TTS_FORMAT | Default output format. Overridden by --format flag. | | TTS_SPEED | Default speed. Overridden by --speed flag. |

Example — set your preferred defaults in your shell profile:

export TTS_VOICE="nova"
export TTS_MODEL="tts-1-hd"
export TTS_FORMAT="wav"

Then just run tts -t "Hello" and it uses those defaults. Pass a flag to override for a single run.

CLI Usage

tts [options]

Options

| Flag | Description | Default | |------|-------------|---------| | -t, --text <text> | Text to speak (required unless -f) | - | | -f, --file <path> | Read text from a file | - | | -o, --output <path> | Output file path | speech-<timestamp>.mp3 | | -v, --voice <voice> | Voice (see below) | alloy | | -m, --model <model> | gpt-4o-mini-tts, tts-1, tts-1-hd | gpt-4o-mini-tts | | --format <fmt> | mp3, opus, aac, flac, wav, pcm | mp3 | | --speed <n> | Speed 0.25–4.0 | 1.0 | | --instructions <text> | Voice style instructions (gpt-4o-mini-tts only) | - | | --install-skill | Install the Claude Code skill | - | | --uninstall-skill | Remove the Claude Code skill | - |

Voices

alloy, ash, ballad, coral, echo, fable, marin, nova, onyx, sage, shimmer, verse, cedar

Examples

Generate speech:

tts -t "Hello world" -v nova -o hello.mp3

Read a file aloud:

tts -f article.txt -v sage --format wav -o article.wav

Use voice style instructions:

tts -t "Breaking news today" --instructions "Speak like a news anchor, clear and authoritative" -o news.mp3

Claude Code Skill

Install the skill so Claude Code can generate speech for you:

tts --install-skill
# or
npx @fionoble/tts-cli --install-skill

Once installed, the /tts skill is available in Claude Code. You can either:

  • Invoke it directly: /tts say hello world
  • Or just ask naturally: "read this text aloud" or "generate speech for this paragraph"

To remove the skill:

tts --uninstall-skill

License

ISC