Gladia
Realtime multilingual speech-to-text with Gladia.
Overview
GladiaSTTService opens a Gladia live session over HTTP (POST /v2/live), then streams base64 audio over the returned WebSocket, with code-switching, translation, custom vocabulary and realtime processing options (see @pipedog/gladia/config).
Installation
bun add @pipedog/gladiaPrerequisites
- A Gladia account and API key, passed as
apiKey(the examples readGLADIA_API_KEY).
GladiaSTTService
Configuration
Prop
Type
Settings
Runtime-updatable settings, passed as settings: new GladiaSTTService.Settings({...}). Settings you leave out keep their defaults.
| Setting | Default | Description |
|---|---|---|
model | "solaria-1" | Gladia model. |
language | Single language. | |
languageConfig | LanguageConfig (languages, code switching). | |
endpointing | Endpointing, in seconds. | |
maximumDurationWithoutEndpointing | 5 | Seconds. |
preProcessing, realtimeProcessing, messagesConfig | Config classes from @pipedog/gladia/config. | |
enableVad | Gladia-side VAD. | |
customMetadata | Metadata attached to the session. |
Usage
import { LanguageConfig } from "@pipedog/gladia/config";
import { GladiaSTTService } from "@pipedog/gladia/stt";
const stt = new GladiaSTTService({
apiKey: process.env.GLADIA_API_KEY ?? "",
region: "eu-west",
settings: new GladiaSTTService.Settings({
languageConfig: new LanguageConfig({ languages: ["en", "fr"], codeSwitching: true }),
}),
});Notes
regionis"us-west"or"eu-west". Passfetchto customize the session request.
Runtimes
| Runtime | Works | What it needs |
|---|---|---|
| Bun | ✅ yes | Nothing. |
| Node.js | ✅ yes | Nothing. |
| Deno | ✅ yes | Nothing. |
| Cloudflare Workers | ✅ yes | Nothing. |
Generated from pipecat.runtimes and pipecat.compat in packages/gladia/package.json: ✅ means the compat smoke test passes on that runtime.
The service uses fetch and the global WebSocket (through core's websocketConnect, which sends the auth header on the handshake on Cloudflare Workers too). Pass no SDK; nothing is Node-only.
pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.
Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).