Groq
Speech-to-text with GroqSTTService, Whisper models served by Groq.
Overview
GroqSTTService: aBaseWhisperSTTServicesubclass. Each utterance (segmented by VAD) is sent to Groq's OpenAI-compatible transcription endpoint, and the text comes back as aTranscriptionFrame.
Upstream page
Pipecat's documentation for the same service.
Source
packages/groq/src/stt.ts.
Groq docs
Speech-to-text models and limits.
Installation
bun add @pipedog/groqimport { GroqSTTService } from "@pipedog/groq/stt";Prerequisites
- A Groq account and an API key from the Groq console.
- Pass the key as
apiKey. It is required, and the service never falls back toOPENAI_API_KEY. The examples read it fromGROQ_API_KEY. - A VAD in the pipeline, since this is a segmented service: it transcribes each utterance once the user stops speaking.
GroqSTTService
Base URL https://api.groq.com/openai/v1.
Configuration
Prop
Type
Settings
Runtime-updatable settings, passed as settings: new GroqSTTService.Settings({...})
(GroqSTTSettings). Any setting you leave out keeps the default below.
| Setting | Type | Default | Description |
|---|---|---|---|
model | string | "whisper-large-v3-turbo" | Whisper model. |
language | Language | null | Language.EN | Language of the audio. |
prompt | string | null | null | Text to guide the style, or to continue a previous segment. |
temperature | number | null | null | Sampling temperature, 0 to 1. |
Usage
import { STTUpdateSettingsFrame } from "@pipedog/core/frames/frames";
import { GroqSTTService } from "@pipedog/groq/stt";
const stt = new GroqSTTService({
apiKey: process.env.GROQ_API_KEY ?? "",
settings: new GroqSTTService.Settings({ model: "whisper-large-v3-turbo" }),
});Change settings mid-call with an STTUpdateSettingsFrame:
// Queue it on the worker, or push it from a processor upstream of the service.
const update = new STTUpdateSettingsFrame({
delta: new GroqSTTService.Settings({ prompt: "Pipecat, pipedog" }),
});Notes
- Uploads each utterance as a WAV file, with
response_format: "json"("verbose_json"whenincludeProbMetricsis on, for per-segment probabilities). httpClientreplaces the SDK'sfetch, for example to set a longer request timeout.pushEmptyTranscriptspushes empty transcriptions instead of dropping them.
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.
- The client is the
openaiJS SDK (through@pipedog/whisper) overfetch. It works on Bun, Node, Deno and Cloudflare Workers. - The deprecated
model,language,promptandtemperatureconstructor options are not ported. Usesettings. - Tested against fakes, 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).