Skip to main content
Community-maintained integration. This service is built and maintained by P99Lab. Pipecat does not test or officially support it. Please report issues and request changes on the source repository. Learn more about community integrations.

Overview

AudreySTTService streams the user’s audio to Audrey, p99lab’s speech-to-text model for phone calls, meetings and accented speech, over a WebSocket. It pushes InterimTranscriptionFrame while the user speaks and a TranscriptionFrame for each finalised utterance. When the pipeline has a turn analyzer, the service asks the server to finalise the open utterance as soon as the user’s turn ends, instead of waiting for the server’s own silence endpointing.

Source Repository

Source code, examples, and issues for the p99lab integration

Example

A complete voice bot with Audrey speech-to-text

p99lab Console

Sign up and create an API key

p99lab Website

Learn about Audrey

Installation

This is a community-maintained package distributed separately from pipecat-ai:

Prerequisites

p99lab Account Setup

Before using the Audrey STT service, you need:
  1. p99lab Account: Sign up at console.p99lab.com
  2. API Key: Create an API key in the console

Required Environment Variables

  • P99LAB_API_KEY: Your p99lab API key for authentication
  • P99LAB_API_URL (optional): API base URL. Defaults to the public Audrey API, https://api.p99lab.com.

Configuration

str
default:"None"
p99lab API key. If None, read from the P99LAB_API_KEY environment variable.
str
default:"None"
API base URL (https://...; the stream URL wss://.../v1/stream is derived from it) or a full wss:// stream URL. If None, read from P99LAB_API_URL, else the public Audrey API.
Language | str
default:"en"
Recognition language: English by default, 30 languages supported ("fr", "de", "ja", …; region codes such as Language.PT_BR are accepted). Turn detection and number formatting are English-only.
str
default:"None"
Context text, up to 500 characters: names, product terms, what the call is about.
int
default:"600"
Silence in milliseconds (200 to 3000) after which the server finalises an utterance by itself.
str
default:"turn"
When to ask the server to finalise the current utterance at once: "turn" (at the end of the user’s turn, when the pipeline has a turn analyzer), "vad" (at every VAD stop) or "never".
int
default:"None"
Input sample rate. If None, uses the pipeline sample rate. Rates other than 8, 16, 24 and 48 kHz are resampled to 16 kHz.
float
default:"30.0"
Seconds to wait for the WebSocket handshake.
AudreySTTService.Settings
default:"None"
Runtime-updatable settings override, merged on top of the explicit kwargs above. See Settings below.

Settings

Runtime-configurable settings passed via the settings constructor argument using AudreySTTService.Settings(...). The settings dataclass extends Pipecat’s STTSettings. Changing any of them finishes the current session and opens a new one, so no transcript is lost.

Errors

Dropped connections and transient server errors are retried with backoff. Account refusals are pushed as a permanent ErrorFrame whose exception is an AudreyAPIError with status and code: 401 (unknown or revoked key), 402 (the account cannot pay; reason and console_url say how to fix it) and 429 for the key’s daily limit.

Usage

Compatibility

Tested with Pipecat v1.12.0. Check the source repository for the latest tested version and changelog.