Use NLTK SentenceTokenizer
mainSentenceTokenizer for text processing tasks. This allows your agent to split text into individual sentences using NLTK's logic.repository·main·Indexed 27 days ago
https://github.com/livekit/agentsA framework for building real-time, programmable, multi-modal voice and video agents that run on servers. It allows developers to mix and match STT, LLM, and TTS providers to create conversational AI participants, featuring a unified API (Inference) and a wide array of plugins including AWS, Azure, Anthropic, OpenAI, and Baseten.
SentenceTokenizer for text processing tasks. This allows your agent to split text into individual sentences using NLTK's logic.The Simplismart plugin provides support for two core voice AI services:
The Sarvam.ai plugin provides support for Indian-language voice AI services, including:
sarvam-30b, sarvam-30b-16k, sarvam-105b, and sarvam-105b-32k models, including tool calling.Install the livekit-plugins-google package using pip to add support for Gemini, Gemini Live, Cloud Speech-to-Text, and Cloud Text-to-Speech to your LiveKit Agents project.
pip install livekit-plugins-googleAVATARTALK_API_KEY environment variable.To use xAI's Grok LLM, STT, TTS, and Grok Voice Agent API with LiveKit Agents, install the plugin via pip:
pip install livekit-plugins-xaiGladiaSTT constructor or set it as an environment variable named GLADIA_API_KEY.Install the Protoface plugin using pip to add support for Protoface virtual avatars to your LiveKit Agents project.
pip install livekit-plugins-protofaceInstall the LiveKit Spatius plugin using pip:
pip install livekit-plugins-spatiusIf you cannot use an async context manager, you must manually manage the lifecycle of the TTS instance. Always call await tts.aclose() in a finally block to ensure resources are released.
import asyncio
from livekit.plugins.resemble import TTS
async def run_tts_example():
tts = TTS(
api_key="your_api_key",
voice_uuid="your_voice_uuid",
)
try:
audio_stream = tts.synthesize("Hello, world!")
async for chunk in audio_stream:
process_audio(chunk.frame.data)
finally
# Always clean up resources when done
await tts.aclose()To use the RTZR plugin, you must provide credentials obtained from the RTZR Developers Console via environment variables. You can also override the API and WebSocket URLs.
Required Credentials:
RTZR_CLIENT_ID: Your RTZR client ID.RTZR_CLIENT_SECRET: Your RTZR client secret.Optional URL Overrides:
RTZR_API_BASE: The base HTTP API URL used for token issuance (e.g., https://openapi.vito.ai).RTZR_WEBSOCKET_URL: The WebSocket URL used for live streaming (e.g., wss://openapi.vito.ai).Note: If RTZR_WEBSOCKET_URL is not provided, the plugin will automatically derive it from RTZR_API_BASE by replacing the scheme with wss://.
RTZR_CLIENT_ID=<your_client_id>
RTZR_CLIENT_SECRET=<your_client_secret>
# Optional overrides
RTZR_API_BASE=https://openapi.vito.ai
RTZR_WEBSOCKET_URL=wss://openapi.vito.ai