LiveKit STS Integration
Automatically track unified Speech-to-Speech (STS) usage for LiveKit Agents using the LiveKitPaygentHook. This is the recommended way to track multimodal sessions.
Prerequisite: Complete the Voice Agent Setup before implementing STS tracking.
Simplified Workflow. The LiveKit hook handles the entire session lifecycle, from initializing the voice session to tracking multimodal usage and setting the final indicator.
Implementation Steps
Step 1 — Initialize Client: Initialize the Paygent Client at the global level.
Step 2 — Attach Hook: The hook automatically calls initialize_voice_session when the room is joined.
livekit_sts_agent.py
