Skip to main content

Bland TTS plugin guide

How to use the Bland TTS plugin for LiveKit Agents.

Available inPython

Overview

This plugin allows you to use Bland  as a TTS provider for your voice agents. By default it streams speech over a realtime WebSocket connection, so audio starts before a sentence finishes and interruptions cancel the current turn. Set streaming=False to synthesize each utterance with a single request to Bland's text-to-speech API  instead.

Installation

Install the plugin from PyPI:

uv add "livekit-agents[bland]~=1.7"

Authentication

The Bland plugin requires a Bland API key, available from the Bland dashboard .

Set BLAND_API_KEY in your .env file.

Usage

Use Bland 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 bland
session = AgentSession(
tts=bland.TTS(
voice_id="2f29fdbb-c55e-4add-9c7c-93437ebf379d",
),
# ... llm, stt, etc.
)

Voices

Bland identifies each voice by a UUID, which also selects the underlying model. Voice names aren't accepted. Browse the Bland voices  to find a voice, then copy its UUID into the voice_id parameter. When unset, the plugin uses a default BTTS_V3 voice.

Voice controls and model versions

The expressiveness and stability controls are calibrated for BTTS_V3 voices. BTTS_V2 voices work, but these controls might behave differently.

Parameters

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

voice_idstringDefault: 2f29fdbb-c55e-4add-9c7c-93437ebf379d

UUID of the Bland voice to use, which also selects the model. Voice names aren't accepted. Defaults to a BTTS_V3 voice. See Voices to find a voice UUID.

expressivenessfloat

Intonation variation, from 0.0 to 1.0. Higher values produce more varied intonation. When unset, the voice uses its default.

stabilityfloat

Consistency across generations, from 0.0 to 1.0. Higher values make repeated synthesis of the same text sound more alike, and lower values allow more variation. When unset, the voice uses its default.

streamingbooleanDefault: true

Whether to stream speech over a realtime WebSocket session. When true, audio starts before the full sentence arrives and an interruption cancels the current turn in place, which is the behavior a voice agent wants. Set it to false to synthesize each utterance with a single HTTP request instead, holding no session open. A standalone synthesize() call uses HTTP either way.

api_keystringEnv: BLAND_API_KEY

Bland API key. Required if the environment variable isn't set.

Additional resources

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