Skip to main content

Groq (Whisper)

Overview

The GroqSTTService provides ultra-fast transcription using Groq's high-speed LPU™ Inference Engine running Whisper models. It is ideal for applications where extremely low latency is critical.

Installation

To use Groq STT, install the required dependencies:

pip install "piopiy-ai[groq]"

Prerequisites

  • A Groq account and API key (Get yours here).
  • Set your API key in your environment:
    export GROQ_API_KEY="your_api_key_here"

Configuration

GroqSTTService Parameters

ParameterTypeDefaultDescription
api_keystrNoneGroq API key (defaults to env var).
modelstr"whisper-large-v3-turbo"Whisper model ID.
languageLanguageENLanguage of the audio input.
promptstrNoneOptional text to guide the model style.
temperaturefloat0.0Sampling temperature for transcription.

Usage

Basic Setup

import os
from piopiy.services.groq.stt import GroqSTTService
from piopiy.transcriptions.language import Language

stt = GroqSTTService(
api_key=os.getenv("GROQ_API_KEY"),
model="whisper-large-v3-turbo",
language=Language.EN
)

Notes

  • Performance: Groq's specialized hardware allows for near-instantaneous transcription using large Whisper models.
  • Segmented Processing: This service processes audio in segments, typically yielding results at the end of a user's utterance.