Speechmatics
Text-to-speech with Speechmatics.
Overview
SpeechmaticsTTSService calls Speechmatics' HTTP TTS endpoint (POST /generate/<voice>?output_format=pcm_16000) and streams the PCM body as audio frames. The endpoint is documented as a preview.
Installation
bun add @pipedog/speechmaticsPrerequisites
- A Speechmatics API key, passed as
apiKey.
SpeechmaticsTTSService
Configuration
Prop
Type
Settings
Runtime-updatable settings, passed as settings: new SpeechmaticsTTSService.Settings({...}). Settings you leave out keep their defaults.
| Setting | Default | Description |
|---|---|---|
voice | "sarah" | Voice. |
maxRetries | 5 | Retries on HTTP 503. |
Usage
import { SpeechmaticsTTSService } from "@pipedog/speechmatics/tts";
const tts = new SpeechmaticsTTSService({
apiKey: process.env.SPEECHMATICS_API_KEY ?? "",
settings: new SpeechmaticsTTSService.Settings({ voice: "sarah" }),
});Notes
sampleRateis 16000 only. Passfetchto use your own HTTP client.
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/speechmatics/package.json: ✅ means the compat smoke test passes on that runtime.
The service uses fetch 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).