Skip to main content

Overview

AWSTranscribeSTTService provides real-time speech recognition using Amazon Transcribe’s WebSocket streaming API with support for interim results, multiple languages, and configurable audio processing parameters for enterprise-grade transcription.

AWS Transcribe STT API Reference

Pipecat’s API methods for AWS Transcribe integration

Example Implementation

Complete example with AWS services integration

AWS Transcribe Documentation

Official AWS Transcribe documentation and features

AWS Console

Access AWS Transcribe services and IAM setup

Installation

To use AWS Transcribe services, install the required dependency:

Prerequisites

AWS Account Setup

Before using AWS Transcribe STT services, you need:
  1. AWS Account: Sign up at AWS Console
  2. IAM User: Create an IAM user with Amazon Transcribe permissions
  3. Credentials: Set up AWS access keys and region configuration

Required Environment Variables

  • AWS_ACCESS_KEY_ID: Your AWS access key ID
  • AWS_SECRET_ACCESS_KEY: Your AWS secret access key
  • AWS_SESSION_TOKEN: Session token (if using temporary credentials)
  • AWS_REGION: AWS region (defaults to “us-east-1”)

Configuration

str | None
default:"None"
AWS secret access key. If None, falls back to environment variables and the default botocore credential chain (instance profiles, IRSA, ECS task roles, SSO, etc.). Temporary credentials from the chain are renewed automatically before they expire.
str | None
default:"None"
AWS access key ID. Same fallback behaviour as api_key.
str | None
default:"None"
AWS session token for temporary credentials.
str | None
default:"None"
AWS region for the service. If None, uses AWS_REGION environment variable (defaults to "us-east-1").
int | None
default:"None"
Audio sample rate in Hz. When None, uses the pipeline’s configured sample rate. AWS Transcribe only supports 8000 or 16000 Hz. Any other rate is declared to AWS as 16000 Hz with a warning, but the audio isn’t resampled.
Language | None
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use settings=AWSTranscribeSTTService.Settings(language=...) instead.
AWSTranscribeSTTService.Settings
default:"None"
Runtime-configurable settings for the STT service. See Settings below.
float | None
default:"AWS_TRANSCRIBE_TTFS_P99"
P99 latency from speech end to final transcript in seconds. Override for your deployment.

Settings

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

Usage

Basic Setup

With Custom Language and Sample Rate

Notes

  • Pre-signed URL authentication: The service uses pre-signed URLs for WebSocket authentication rather than passing credentials directly, following AWS best practices.

Event Handlers

AWS Transcribe STT supports the standard service connection events: