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

tryspeakeasy

v1.0.0

Published

Official Node.js/TypeScript SDK for the SpeakEasy API — affordable speech-to-text and text-to-speech for developers.

Readme

SpeakEasy Node.js SDK

Official Node.js/TypeScript client for the SpeakEasy API — affordable speech-to-text and text-to-speech for developers.

npm version License: MIT

Installation

npm install tryspeakeasy

Quick Start

import { SpeakEasy } from 'tryspeakeasy'

const se = new SpeakEasy('sk-se-your_api_key')

// Transcribe audio
const { text } = await se.transcribe({
  url: 'https://example.com/audio.mp3',
})
console.log(text)

// Generate speech
const audio = await se.speech({
  input: 'Hello world!',
  voice: 'nova',
})

Get your API key from the SpeakEasy dashboard.

Usage

Speech-to-Text

Transcribe audio files or URLs. Supports mp3, wav, flac, aac, opus, ogg, m4a, mp4, and webm (max 100 MB).

// From URL
const result = await se.transcribe({
  url: 'https://example.com/podcast.mp3',
})
console.log(result.text)

// From file (Node.js)
import { readFileSync } from 'fs'
const file = new Blob([readFileSync('recording.mp3')])
const result = await se.transcribe({ file })

// With options
const result = await se.transcribe({
  url: 'https://example.com/audio.mp3',
  language: 'en',
  speakerLabels: true,
  wordTimestamps: true,
  responseFormat: 'verbose_json',
})
console.log(result.segments) // timestamped segments

Response Formats

// JSON (default) — { text: string }
const json = await se.transcribe({ url, responseFormat: 'json' })

// Verbose JSON — includes segments with timestamps
const verbose = await se.transcribe({ url, responseFormat: 'verbose_json' })

// Plain text
const text = await se.transcribe({ url, responseFormat: 'text' })

// Subtitles
const srt = await se.transcribe({ url, responseFormat: 'srt' })
const vtt = await se.transcribe({ url, responseFormat: 'vtt' })

Async with Webhook

For long audio files, provide a callbackUrl to get results asynchronously:

await se.transcribe({
  url: 'https://example.com/long-podcast.mp3',
  callbackUrl: 'https://your-server.com/webhook',
})
// Your server receives the result via POST when done

Text-to-Speech

Convert text to audio with 40+ voices across 10 languages.

// Generate speech (returns ArrayBuffer)
const audio = await se.speech({
  input: 'Welcome to SpeakEasy!',
  voice: 'nova',
})

// Save to file (Node.js)
import { writeFileSync } from 'fs'
writeFileSync('output.mp3', Buffer.from(audio))

// With options
const audio = await se.speech({
  input: 'Bonjour le monde!',
  voice: 'amelie',
  language: 'fr',
  responseFormat: 'wav',
  speed: 1.2,
})

// With word timestamps (returns JSON instead of audio)
const result = await se.speech({
  input: 'Hello world',
  wordTimestamps: true,
})
console.log(result.word_timestamps)
// [{ word: 'Hello', start: 0.0, end: 0.4 }, { word: 'world', start: 0.5, end: 0.9 }]

Available Voices

| Language | Voices | |----------|--------| | English (US) | heart, bella, michael, alloy, aoede, kore, jessica, nicole, nova, river, sarah, sky, echo, eric, fenrir, liam, onyx, puck, adam, santa | | English (UK) | alice, emma, isabella, lily, daniel, fable, george, lewis | | Japanese | haruto, yuki | | Chinese | xiaobei, yunjian | | Spanish | carlos, maria | | French | pierre, amelie | | Hindi | arjun, priya | | Italian | luca, giulia | | Portuguese (BR) | pedro, ana |

Error Handling

import { SpeakEasy, SpeakEasyError } from 'tryspeakeasy'

try {
  await se.transcribe({ url: 'https://example.com/audio.mp3' })
} catch (err) {
  if (err instanceof SpeakEasyError) {
    console.log(err.status)  // 402, 429, etc.
    console.log(err.message) // 'No active subscription'
  }
}

| Status | Meaning | |--------|---------| | 401 | Missing or invalid API key | | 403 | No active subscription | | 429 | Too many concurrent requests (max 10) |

Configuration

const se = new SpeakEasy('sk-se-your_api_key', {
  // Override the base URL
  baseUrl: 'https://staging.tryspeakeasy.io',
  // Provide a custom fetch implementation
  fetch: myCustomFetch,
})

API Reference

| Method | Description | |--------|-------------| | transcribe(options) | Speech-to-text — transcribe audio files or URLs | | speech(options) | Text-to-speech — generate audio from text |

Requirements

  • Node.js 18+ (uses native fetch)
  • A SpeakEasy account with an active subscription

Links

  • SpeakEasy — Affordable Speech-to-Text & Text-to-Speech API
  • Dashboard — API key management and usage monitoring
  • Documentation — Full API reference
  • Pricing — Usage-based pricing starting at $9/month

License

MIT


Built by SIÁN Agency