Skip to main content

Speechmatics TTS plugin guide

How to use the Speechmatics TTS plugin for LiveKit Agents.

On this page

Available inPython

Overview

This plugin allows you to use Speechmatics  as a TTS provider for your voice agents. The plugin uses the Speechmatics preview TTS API and doesn't support streaming.

Quick reference

This section includes a brief overview of the Speechmatics TTS plugin. For more information, see Additional resources.

Installation

Install the plugin from PyPI:

uv add "livekit-agents[speechmatics]~=1.8"

Authentication

The Speechmatics plugin requires a Speechmatics API key .

Set SPEECHMATICS_API_KEY in your .env file.

Usage

Use Speechmatics TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.plugins import speechmatics
session = AgentSession(
tts=speechmatics.TTS(
voice="sarah",
),
# ... llm, stt, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

voicestringDefault: sarah

Voice model to use for synthesis. Valid values: sarah, theo, and megan.

Additional resources

The following resources provide more information about using Speechmatics TTS with LiveKit Agents.

Voice AI quickstart

Get started with LiveKit Agents and Speechmatics TTS.