Soniox
Streaming text-to-speech with Soniox.
Overview
SonioxTTSService streams text to Soniox's real-time TTS WebSocket and yields PCM audio, with keepalive and stream reuse across turns.
Installation
bun add @pipedog/sonioxPrerequisites
- A Soniox account and API key, passed as
apiKey(the examples readSONIOX_API_KEY).
SonioxTTSService
Configuration
Prop
Type
Settings
Runtime-updatable settings, passed as settings: new SonioxTTSService.Settings({...}). Settings you leave out keep their defaults.
| Setting | Default | Description |
|---|---|---|
model | "tts-rt-v2" | Soniox TTS model. |
voice | "Bryce" | Voice. |
language | Language.EN | Language. |
speed | Speaking speed. | |
reduceSilence | Not supported by every model. | |
clientReferenceId | Your own reference. |
Usage
import { SonioxTTSService } from "@pipedog/soniox/tts";
const tts = new SonioxTTSService({
apiKey: process.env.SONIOX_API_KEY ?? "",
settings: new SonioxTTSService.Settings({ voice: "Adrian", speed: 1.1 }),
});Notes
sampleRatemust be one ofVALID_SAMPLE_RATES.
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/soniox/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).