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

bland-tts

v0.2.0

Published

Focused TTS + voice toolkit for Bland AI — CLI, Node library, and MCP server in one package.

Readme

bland-tts

Focused TTS + voice toolkit for Bland AI. Three modes from one package:

  • CLInpx bland-tts speak "hello world" --voice maya -o hello.mp3
  • Libraryimport { BlandTtsClient } from "bland-tts" for Node scripting
  • MCP servernpx bland-tts mcp — drop-in for Claude Code, Cursor, Claude Desktop

If you want the full Bland API surface (calls, pathways, scenarios, knowledge bases…), use bland-cli. This package is the speech subset.

Install

npm i -g bland-tts        # global CLI
# or
npm i bland-tts           # library / per-project

Auth

Set your Bland API key in the environment:

export BLAND_API_KEY=org_your_key_here

(Or pass apiKey to the BlandTtsClient constructor.)

Default voices

When you call speak() without specifying a voice, one is picked at random from:

  • Karen
  • Valentine Experimental
  • Willow

To lock a single default for a process, pass defaultVoice to the client constructor; to opt out and let the server choose, pass defaultVoice: null. The CLI surfaces which voice was actually used (voice_used in --json, dimmed line otherwise).

CLI

# Speak some text — voice picked from the rotation
bland-tts speak "Hey, thanks for calling Maple Vet"
# → "voice: Karen" (or Valentine Experimental, or Willow)

# Pin a specific voice
bland-tts speak "Hello world" --voice maya -o hello.mp3
bland-tts speak "Hola" --language es --json

# Voices
bland-tts voices                       # list
bland-tts voices --custom              # only voices you've cloned
bland-tts voice maya                   # full details for one voice

# Voice cloning (BTTS v2)
bland-tts clone "MyVoice" sample1.wav sample2.wav
bland-tts rename <voice_id> "NewName"
bland-tts delete <voice_id>

# Browse stored TTS generations (auto-stored from `speak`)
bland-tts samples list
bland-tts samples list --voice <voice_id> --limit 10
bland-tts samples get <sample_id> -o sample.mp3

Every command supports --json for scripting.

Library

import { BlandTtsClient } from "bland-tts";

const tts = new BlandTtsClient(); // reads BLAND_API_KEY from env

// One-shot synthesis to a file
const { audio } = await tts.speakToBuffer({
  text: "Hello world",
  voice: "maya",
});
await fs.writeFile("out.mp3", audio);

// Just get the URL
const res = await tts.speak({ text: "Hi", voice: "nat", language: "en" });
console.log(res.url);

// Voices
const voices = await tts.listVoices();
const maya = await tts.getVoice("maya");

// Clone
await tts.cloneVoice({
  name: "MyVoice",
  samples: [
    { filename: "a.wav", content: await fs.readFile("a.wav") },
  ],
});

// Manage
await tts.renameVoice(voiceId, "NewName");
await tts.deleteVoice(voiceId);

// Stored samples
const recent = await tts.listSamples({ limit: 10 });
const sample = await tts.getSample(recent[0].id);

Library API

| Method | Endpoint | Notes | |---|---|---| | speak({text, voice?, language?}) | POST /v1/speak | Returns {url, sample_id}. Auto-stores. | | speakToBuffer({...}) | (same) + download | One-call synth-and-download. Returns Uint8Array. | | listVoices() | GET /v1/voices | All voices on your account. | | getVoice(idOrName) | GET /v1/voices/:id | Accepts UUID or name. | | cloneVoice({name, samples}) | POST /v1/voices/clone | Multipart. name ≤ 30 chars. | | renameVoice(id, name) | PATCH /v1/voices/:id | | | deleteVoice(id) | DELETE /v1/voices/:id | Permanent. | | listSamples({voiceId?, limit?, offset?}) | GET /v1/speak/samples | Past speak() outputs. | | getSample(id) | GET /v1/speak/samples/:id | One sample by ID. |

All methods throw BlandApiError (with .status and .body) on API failures.

MCP server

Hook into Claude Code, Cursor, Claude Desktop, Windsurf, etc.

~/.config/claude-code/mcp.json (or your client's equivalent):

{
  "mcpServers": {
    "bland-tts": {
      "command": "npx",
      "args": ["-y", "bland-tts", "mcp"],
      "env": { "BLAND_API_KEY": "org_your_key_here" }
    }
  }
}

Tools exposed (7):

| Tool | Does what | |---|---| | tts_speak | Convert text to speech with a chosen voice | | tts_voices_list | List voices on your account | | tts_voice_get | Details for one voice (by ID or name) | | tts_voice_rename | Rename a cloned voice | | tts_voice_delete | Delete a cloned voice | | tts_samples_list | Browse past TTS generations | | tts_sample_get | Fetch one stored generation |

Voice cloning is intentionally CLI-only since multipart file uploads aren't well-suited to stdio JSON-RPC. Use bland-tts clone <name> <files...> for that.

Why a separate package?

bland-cli is the full kitchen sink — calls, pathways, scenarios, knowledge bases, personas, batch campaigns. Big install, broad surface.

bland-tts is for projects that just need speech: a podcast generator, a voice notification system, an experimentation harness for prompt phrasing. Tiny dependency footprint (chalk, commander, ora). Library-first design means you can drop the MCP server and import BlandTtsClient directly.

License

MIT