pipedog is an unofficial community port of Pipecat, not affiliated with Daily.
pipedog
Text-to-speech

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/soniox

Prerequisites

  • A Soniox account and API key, passed as apiKey (the examples read SONIOX_API_KEY).

SonioxTTSService

Configuration

Prop

Type

Settings

Runtime-updatable settings, passed as settings: new SonioxTTSService.Settings({...}). Settings you leave out keep their defaults.

SettingDefaultDescription
model"tts-rt-v2"Soniox TTS model.
voice"Bryce"Voice.
languageLanguage.ENLanguage.
speedSpeaking speed.
reduceSilenceNot supported by every model.
clientReferenceIdYour own reference.

Usage

tts.ts
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

  • sampleRate must be one of VALID_SAMPLE_RATES.

Runtimes

RuntimeWorksWhat it needs
Bun✅ yesNothing.
Node.js✅ yesNothing.
Deno✅ yesNothing.
Cloudflare Workers✅ yesNothing.

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).

On this page