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

@dtelecom/stt

v0.2.1

Published

TypeScript SDK for dTelecom real-time speech-to-text with x402 micropayments

Readme

@dtelecom/stt

TypeScript SDK for dTelecom real-time speech-to-text with x402 micropayments.

Pay-per-minute STT powered by Whisper and Parakeet, with automatic blockchain payments via USDC on Base or Solana.

Install

npm install @dtelecom/stt

Quick Start

import { STTClient } from "@dtelecom/stt";

// EVM wallet (Base)
const client = new STTClient({ privateKey: "0x..." });
// Or Solana wallet — use async factory
// const client = await STTClient.create({ privateKey: "base58..." });

const stream = await client.session({ minutes: 5, language: "en" }).open();
try {
  for await (const t of stream.transcribeFile("meeting.wav")) {
    console.log(`[${t.start?.toFixed(1)}s] ${t.text}`);
  }
} finally {
  await stream.close();
}

Real-Time Streaming

import { STTClient } from "@dtelecom/stt";

const client = new STTClient({ privateKey: "0x..." }); // or await STTClient.create({ privateKey: "base58..." })

const stream = await client.session({ minutes: 5, language: "en" }).open();

// Callback-based
stream.onTranscription((t) => console.log(t.text));

// Send audio chunks (PCM16, 16kHz, mono)
await stream.sendAudio(pcmBuffer);

// Or iterate asynchronously
for await (const t of stream.transcriptions()) {
  console.log(t.text);
}

await stream.close();

Auto-Extend Sessions

Sessions automatically buy more time when running low (enabled by default):

// 30-minute session that auto-extends
const stream = await client.session({ minutes: 30, language: "en" }).open();
// When <60s remaining, SDK buys 5 more minutes automatically

// Disable auto-extend
const stream = await client.session({ minutes: 5, autoExtend: false }).open();

Audio Format

The server expects PCM16, 16kHz, mono audio. Convert with ffmpeg:

ffmpeg -i input.mp3 -ar 16000 -ac 1 -acodec pcm_s16le output.wav

Pricing

const info = await client.pricing();
console.log(`$${info.pricePerMinuteUsd}/min (${info.currency} on ${info.network})`);

Current pricing: $0.005/min (USDC on Base or Solana).

API Reference

new STTClient({ privateKey, url? }) / STTClient.create({ privateKey, url? })

Main client. Default URL: https://x402stt.dtelecom.org.

  • EVM key (hex, 0x-prefixed): pays with USDC on Base — use new STTClient() or STTClient.create()

  • Solana key (base58): pays with USDC on Solana — use await STTClient.create()

  • session({ minutes?, language?, autoExtend? }) — Create a session context

  • pricing() — Get pricing info

  • health() — Check server health

SessionContext

Returned by client.session().

  • open() — Create the paid session and connect, returns a Stream

Stream

Returned by sessionContext.open().

  • sendAudio(data: Buffer) — Send raw PCM16 audio
  • transcriptions() — Async generator of Transcription objects
  • transcribeFile(path) — Stream a WAV file and yield transcriptions
  • onTranscription(callback) — Register callback for transcriptions
  • close() — Close the stream

Transcription

  • text: string — Transcribed text
  • start?: number — Start time in seconds
  • end?: number — End time in seconds
  • confidence?: number — Confidence score
  • isFinal: boolean — Whether this is a final transcription

Supported Languages

25 languages via Parakeet-TDT (fast) with Whisper fallback:

English, Russian, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech, Romanian, Hungarian, Greek, Turkish, Ukrainian, Swedish, Norwegian, Danish, Finnish, Catalan, Croatian, Lithuanian, Slovenian, Latvian, Estonian.

Error Handling

import { PaymentError, SessionExpiredError, ConnectionError } from "@dtelecom/stt";

try {
  const stream = await client.session({ minutes: 5 }).open();
  for await (const t of stream.transcriptions()) {
    console.log(t.text);
  }
} catch (e) {
  if (e instanceof PaymentError) {
    console.log("Payment failed — check wallet balance");
  } else if (e instanceof SessionExpiredError) {
    console.log("Session time ran out");
  } else if (e instanceof ConnectionError) {
    console.log("Cannot connect to server");
  }
}

License

MIT