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

Groq

Text-to-speech with GroqTTSService, over Groq's OpenAI-compatible speech API.

Overview

  • GroqTTSService: posts each sentence to Groq's /audio/speech endpoint and pushes the WAV it returns as audio frames.

Installation

bun add @pipedog/groq
import { 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 from GROQ_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.

SettingTypeDefaultDescription
modelstring"canopylabs/orpheus-v1-english"Speech model.
voicestring"autumn"Voice.
languagestring"en"Language.
speednumber | null1.0Speed. Groq only supports 1.0 for now.

Usage

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

  • outputFormat is "wav" by default; the frames carry the WAV's own sample rate and channel count.
  • A failed request produces an ErrorFrame instead of audio.

Runtime notes

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

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 the groq SDK). 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 InputParams and the params, model_name and voice_id options are not ported. Use settings.
  • 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).

On this page