Skip to main content

Overview

GroqTTSService provides fast text-to-speech synthesis using Groq’s TTS API with multiple voice options.

Groq TTS API Reference

Pipecat’s API methods for Groq TTS integration

Example Implementation

Complete example with Groq STT and LLM

Groq Documentation

Official Groq API documentation and models

Voice Options

Explore available voice models and features

Installation

To use Groq services, install the required dependencies:

Prerequisites

Groq Account Setup

Before using Groq TTS services, you need:
  1. Groq Account: Sign up at Groq Console
  2. API Key: Generate an API key from your account dashboard
  3. Voice Selection: Choose from available voice models

Required Environment Variables

  • GROQ_API_KEY: Your Groq API key for authentication

Configuration

GroqTTSService

str
required
Groq API key for authentication.
str
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use settings=GroqTTSService.Settings(model=...) instead.
str
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use settings=GroqTTSService.Settings(voice=...) instead.
str
default:"wav"
Audio output format. Must be "wav": the service decodes each response as WAV, so any other format produces an ErrorFrame instead of audio.
int | None
default:"None"
Audio sample rate in Hz. Not sent to Groq: audio frames carry the sample rate of the WAV that Groq returns, so this value doesn’t change the output audio.
InputParams
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use settings=GroqTTSService.Settings(...) instead.
GroqTTSService.Settings
default:"None"
Runtime-configurable settings. See Settings below.

Settings

Runtime-configurable settings passed via the settings constructor argument using GroqTTSService.Settings(...). These can be updated mid-conversation with TTSUpdateSettingsFrame. See Service Settings for details.

Usage

Basic Setup

With Custom Settings