Groq
Text-to-speech with GroqTTSService, over Groq's OpenAI-compatible speech API.
Overview
GroqTTSService: posts each sentence to Groq's/audio/speechendpoint and pushes the WAV it returns as audio frames.
Upstream page
Pipecat's documentation for the same service.
Source
packages/groq/src/tts.ts.
Groq docs
Text-to-speech models and voices.
Installation
bun add @pipedog/groqimport { GroqTTSService } from "@pipedog/groq/tts";Prerequisites
- A Groq account and an API key from the Groq console.
- Pass the key as
apiKey. The examples read it fromGROQ_API_KEY.
GroqTTSService
Posts to https://api.groq.com/openai/v1/audio/speech.
Configuration
Prop
Type
Settings
Runtime-updatable settings, passed as settings: new GroqTTSService.Settings({...})
(GroqTTSSettings). Any setting you leave out keeps the default below.
| Setting | Type | Default | Description |
|---|---|---|---|
model | string | "canopylabs/orpheus-v1-english" | Speech model. |
voice | string | "autumn" | Voice. |
language | string | "en" | Language. |
speed | number | null | 1.0 | Speed. Groq only supports 1.0 for now. |
Usage
import { TTSUpdateSettingsFrame } from "@pipedog/core/frames/frames";
import { GroqTTSService } from "@pipedog/groq/tts";
const tts = new GroqTTSService({
apiKey: process.env.GROQ_API_KEY ?? "",
settings: new GroqTTSService.Settings({ voice: "autumn" }),
});Change settings mid-call with an TTSUpdateSettingsFrame:
// Queue it on the worker, or push it from a processor upstream of the service.
const update = new TTSUpdateSettingsFrame({
delta: new GroqTTSService.Settings({ voice: "diana" }),
});Notes
outputFormatis"wav"by default; the frames carry the WAV's own sample rate and channel count.- A failed request produces an
ErrorFrameinstead of audio.
Runtime notes
| 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/groq/package.json: ✅ means the compat smoke test passes on that runtime.
- Requests go through
fetch(upstream uses thegroqSDK). It works on Bun, Node, Deno and Cloudflare Workers. - The whole response is read and parsed as one WAV. Upstream parses each streamed chunk as a WAV.
- The deprecated
InputParamsand theparams,model_nameandvoice_idoptions are not ported. Usesettings. - Tested against a local fake, not against Groq itself.
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).