Skip to main content

Soniox TTS plugin guide

How to use the Soniox TTS plugin for LiveKit Agents.

Available inPython
|
Node.js

Overview

This plugin allows you to use Soniox  as a TTS provider for your voice agents.

Installation

Install the plugin:

uv add "livekit-agents[soniox]~=1.5"
pnpm add @livekit/agents-plugin-soniox@1.x

Authentication

The Soniox plugin requires an API key from the Soniox console .

Set SONIOX_API_KEY in your .env file.

Usage

Use Soniox 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 soniox
session = AgentSession(
tts=soniox.TTS(),
# ... llm, stt, etc.
)
import { voice } from '@livekit/agents';
import * as soniox from '@livekit/agents-plugin-soniox';
const session = new voice.AgentSession({
tts: new soniox.TTS(),
// ... llm, stt, etc.
});

Parameters

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

modelstringDefault: tts-rt-v1-preview

Soniox TTS model to use. See documentation  for a complete list of supported models.

voicestringDefault: Maya

Voice to use for synthesis. For available options, see the Soniox TTS voices list .

languagestringDefault: en

Language code for the input text (such as "en", "es", "fr"). For supported values, see the Soniox TTS languages list .

speedfloatDefault: 1.0

Speaking rate, where 1.0 is normal. Values below 1.0 slow speech down and above 1.0 speed it up. Valid range is 0.7 to 1.3.

Additional resources

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