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

@absolutejs/voice-gladia

v0.0.1-beta.2

Published

Gladia real-time speech-to-text adapter for @absolutejs/voice

Readme

@absolutejs/voice-gladia

Gladia real-time speech-to-text adapter for @absolutejs/voice.

Implements Gladia's two-step v2 live handshake directly (no Gladia SDK dep): POST /v2/live to create a session and receive a one-time WebSocket URL, connect, stream binary PCM/μ-law/A-law audio, and consume transcript / end_of_utterance JSON messages. Excellent at multilingual code-switch (Hindi-English, Catalan-Spanish, etc.) thanks to Gladia's language model.

Install

bun add @absolutejs/voice-gladia

@absolutejs/voice is a runtime dependency.

Use

import { voice } from "@absolutejs/voice";
import { gladia } from "@absolutejs/voice-gladia";

const app = voice({
  stt: gladia({
    apiKey: process.env.GLADIA_API_KEY!,
    // optional:
    model: "solaria-1",
    languages: ["en"],         // language detection seed
    codeSwitching: true,       // for multilingual callers
    realtimeProcessing: { sentences: true },
  }),
  // ... tts + other options ...
});

For mixed Hindi/English callers (CoSHE-style), pair with languageStrategy:

app.use({
  stt: gladia({ apiKey, codeSwitching: true }),
  // and at open() time:
  // languageStrategy: { mode: 'allow-switching', primaryLanguage: 'en', secondaryLanguages: ['hi'] }
});

Options

| Option | Required | Default | Notes | | --- | --- | --- | --- | | apiKey | yes | — | Gladia API key, sent as X-Gladia-Key. | | model | no | solaria-1 | Gladia model id. | | languages | no | — | Default language list, overridden when STTAdapterOpenOptions.languageStrategy resolves a list. | | codeSwitching | no | — | Enable mid-utterance language switching. | | realtimeProcessing | no | — | Forwarded to Gladia's realtime_processing config (sentences, diarization, etc.). | | punctuationConfig | no | — | Forwarded to punctuation_config. | | baseUrl | no | https://api.gladia.io | Override for staging / enterprise endpoints. | | sessionPath | no | /v2/live | Override if you proxy Gladia behind a gateway. | | connectTimeoutMs | no | 8000 | Time to wait for the WebSocket open event. | | fetch | no | globalThis.fetch | Inject for tests; opportunistic HTTP/2 multiplexing on outbound HTTPS. | | webSocket.factory | no | new WebSocket(url) | Inject a fake socket for tests. |

Notes

  • Audio sent before the WebSocket open completes is buffered and flushed once the socket is ready.
  • transcript messages → partial when data.is_final !== true, final otherwise. Confidence + per-utterance start / end (converted to ms) are lifted onto the transcript.
  • end_of_utterance / speech_endendOfTurn with reason: "vendor".
  • session.close(reason) sends { "type": "stop_recording" } and then closes the socket cleanly.
  • Supported encodings on STTAdapterOpenOptions.format.encoding: pcm_s16lewav/pcm, mulaw / pcm_mulawwav/ulaw, alaw / pcm_alawwav/alaw.