Overview
Baseten is a hosted inference platform that allows you to deploy and serve any machine learning model. With LiveKit's Baseten integration and the Agents framework, you can build AI agents that provide high-quality speech synthesis using models like Orpheus.
Quick reference
This section provides a quick reference for the Baseten TTS plugin. For more information, see Additional resources.
Installation
Install the plugin from PyPI:
pip install "livekit-agents[baseten]~=1.0"
Authentication
The Baseten plugin requires a Baseten API key.
Set the following in your .env
file:
BASETEN_API_KEY=<your-baseten-api-key>
Model deployment
You must deploy a TTS model such as Orpheus to Baseten to use it with LiveKit Agents. Your deployment includes a private model endpoint URL to provide to the LiveKit Agents integration.
Usage
Use Baseten 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 basetensession = AgentSession(tts=baseten.TTS(model_endpoint="<your-model-endpoint>",voice="tara",)# ... llm, stt, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
The endpoint URL for your deployed model. You can find this in your Baseten dashboard.
The voice to use for speech synthesis.
Controls the randomness of the generated speech. Higher values make the output more random.
Additional resources
The following resources provide more information about using Baseten with LiveKit Agents.
Python package
The livekit-plugins-baseten
package on PyPI.
Plugin reference
Reference for the Baseten TTS plugin.
GitHub repo
View the source or contribute to the LiveKit Baseten TTS plugin.
Baseten docs
Baseten's full docs site.
Voice AI quickstart
Get started with LiveKit Agents and Baseten.
Baseten STT
Guide to the Baseten STT integration with LiveKit Agents.