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

@wopr-network/wopr-plugin-voice-deepgram-stt

v1.0.0

Published

Deepgram STT provider using nova-3 model

Readme

WOPR Voice Plugin: Deepgram STT

Cloud-based Speech-to-Text provider using Deepgram's nova-3 model.

Features

  • Batch Transcription: Transcribe complete audio buffers via REST API
  • Streaming Transcription: Real-time transcription via WebSocket
  • Language Detection: Auto-detect language or specify explicitly
  • High Accuracy: Uses Deepgram's latest nova-3 model
  • Partial Transcripts: Get interim results during streaming

Requirements

  • Deepgram API key (sign up at https://deepgram.com)
  • Environment variable: DEEPGRAM_API_KEY

Installation

cd /home/tsavo/wopr-project/plugins/wopr-plugin-voice-deepgram-stt
pnpm install
pnpm build

Configuration

Set your API key in the environment:

export DEEPGRAM_API_KEY="your-api-key-here"

Or configure via WOPR config:

{
  "plugins": {
    "voice-deepgram-stt": {
      "apiKey": "your-api-key-here",
      "model": "nova-3",              // nova-3, nova-2, nova, enhanced, base
      "language": "en",                // Language code or "auto"
      "wordTimestamps": false,
      "timeoutMs": 30000
    }
  }
}

Usage

Batch Transcription

const stt = ctx.getSTT();
if (!stt) {
  throw new Error("No STT provider registered");
}

const audioBuffer = await fs.readFile("audio.wav");
const transcript = await stt.transcribe(audioBuffer, {
  language: "en",
});

console.log("Transcript:", transcript);

Streaming Transcription

const stt = ctx.getSTT();
const session = await stt.createSession({
  language: "en",
  vadEnabled: true,
  vadSilenceMs: 1000,
});

// Listen for partial results
session.onPartial((chunk) => {
  if (chunk.isFinal) {
    console.log("Final:", chunk.text);
  } else {
    console.log("Partial:", chunk.text);
  }
});

// Send audio chunks
for (const chunk of audioChunks) {
  session.sendAudio(chunk);
}

// Signal end of audio
session.endAudio();

// Wait for final transcript
const finalTranscript = await session.waitForTranscript();
console.log("Complete:", finalTranscript);

// Cleanup
await session.close();

API Reference

DeepgramProvider

Implements the STTProvider interface from wopr/voice.

Methods

  • validateConfig(): Validates configuration (throws on error)
  • createSession(options?: STTOptions): Create streaming session
  • transcribe(audio: Buffer, options?: STTOptions): Batch transcription
  • healthCheck(): Check API connectivity (returns boolean)

DeepgramSession

Implements the STTSession interface for streaming.

Methods

  • sendAudio(audio: Buffer): Send audio chunk for transcription
  • endAudio(): Signal end of audio stream
  • onPartial(callback): Register callback for partial transcripts
  • waitForTranscript(timeoutMs?): Wait for final transcript
  • close(): Close session and cleanup

Supported Models

  • nova-3 (default): Latest and most accurate
  • nova-2: Previous generation
  • nova: Original nova model
  • enhanced: Enhanced accuracy
  • base: Baseline model

Supported Languages

Deepgram supports 30+ languages. Common codes:

  • en - English
  • es - Spanish
  • fr - French
  • de - German
  • zh - Chinese
  • auto - Auto-detect

Full list: https://developers.deepgram.com/docs/languages

Error Handling

All methods throw descriptive errors:

try {
  const transcript = await stt.transcribe(audio);
} catch (err) {
  if (err.message.includes("HTTP 401")) {
    console.error("Invalid API key");
  } else if (err.message.includes("timeout")) {
    console.error("Request timed out");
  } else {
    console.error("Transcription failed:", err);
  }
}

Performance

  • Batch: ~2-5 seconds for 1 minute of audio
  • Streaming: Real-time with <500ms latency
  • Accuracy: 90-95% on clean audio
  • Rate Limits: Varies by plan (check Deepgram dashboard)

License

MIT