livekit-plugins-satham
satham's realtime speech-to-speech model (satham-1) as a RealtimeModel for LiveKit Agents. Your
LiveKit agent keeps its own instructions and tools; satham hears the caller, ends turns, replies in
speech and handles barge-in, so the AgentSession needs no STT, LLM, TTS or VAD. The parameters
follow LiveKit's OpenAI RealtimeModel, so moving an agent from OpenAI to satham is mostly a one-line
change. satham.TTS brings kural-1, satham's text-to-speech model, to sessions with an LLM of their
own (Text to speech).
LiveKit Agents 1.8; Python 3.11+.
pip install livekit-plugins-satham
Use
You pass your satham endpoint and API key (or set SATHAM_URL and SATHAM_API_KEY); there is no
default server.
import os
from livekit.agents import (
Agent,
AgentServer,
AgentSession,
JobContext,
RunContext,
cli,
function_tool,
llm,
)
from livekit.plugins import satham
class SiteVisit(Agent):
def __init__(self) -> None:
# The agent's role and tools are satham's instructions and tools, as they stand.
super().__init__(instructions="You are Asha, who books site visits for Example Homes.")
@function_tool
async def end_call(self, context: RunContext, reason: str = "done") -> llm.ToolResult:
"""End the call when the conversation is over. Say a short goodbye in the same turn."""
await context.wait_for_playout() # let the goodbye finish
... # hang up, e.g. delete the room
return llm.ToolResult("ended", reply_required=False)
server = AgentServer()
@server.rtc_session()
async def entrypoint(ctx: JobContext) -> None:
await ctx.connect()
session = AgentSession(
llm=satham.RealtimeModel( # was: openai.realtime.RealtimeModel(voice=...)
url=os.environ["SATHAM_URL"],
api_key=os.environ["SATHAM_API_KEY"],
greeting="Hello, this is Asha from Example Homes. Is this a good time?",
language="en",
language_switch="auto",
)
)
await session.start(agent=SiteVisit(), room=ctx.room)
if __name__ == "__main__":
cli.run_app(server)
- Instructions and tools. The LiveKit agent's
instructionsbecome the call's instructions and its@function_tools the call's tools, with nothing else to set. Both can change mid-call (agent.update_instructions(),agent.update_tools()). - The opening and fixed words. With
greeting, the agent says it first. Otherwisesession.generate_reply(instructions=...)asks for a reply now (satham'sresponse.create; use it inon_enterto open the call), andsession.say(text)speaks fixed words in the call's voice (response.say) with no TTS. With neither, the caller speaks first. - Mid-call changes.
model.update_options(...)changes any control on every live call;session.current_agent.realtime_llm_session.update_options(...)changes one call. - Language changes are emitted as
session_updated(asatham.SessionUpdated: the language, and the reasoncaller,replyorclient).
From OpenAI RealtimeModel to satham
OpenAI RealtimeModel |
satham RealtimeModel |
Supported | Notes |
|---|---|---|---|
model |
model |
yes | default "satham-1" |
voice |
voice |
yes | a satham voice name, or a cloned voice's id |
modalities |
modalities |
yes | ["audio", "text"], ["audio"], or ["text"], which hands the words to the session's TTS as OpenAI's text mode does |
temperature |
temperature |
yes | |
turn_detection |
turn_detection |
yes | server_vad and semantic_vad are both satham's endpointing; None/null leaves turns to LiveKit; satham adds barge_in, continue_within_ms, ... |
input_audio_noise_reduction |
input_audio_noise_reduction |
yes | near_field or far_field; "none" turns it off, and null keeps the server's default (on); satham adds strength_db and apply_to_transcription |
input_audio_transcription |
input_audio_transcription |
partly | enabled and code_mixed; satham transcribes with its own models, so OpenAI's model and prompt are ignored |
max_response_output_tokens |
max_response_output_tokens |
yes | or "inf" |
speed |
speed |
yes | |
tool_choice |
tool_choice |
yes | preview: needs a server with tool support |
api_key |
api_key |
yes | your satham key |
base_url |
url |
yes | your satham endpoint |
| Agent instructions | Agent instructions | yes | can change mid-call |
generate_reply() |
generate_reply() |
yes | response.create; instructions guide that reply alone |
session.say() |
session.say() |
yes | response.say, no TTS needed (agents-js: call it on the realtime session) |
| tracing, truncation, reasoning | - | no | not applicable |
| azure_deployment, entra_token, api_version | - | no | not applicable |
| max_session_duration, conn_options | - | no | connect_timeout / connectTimeoutMs instead |
Controls
Every keyword of RealtimeModel(...) and update_options(...) besides url, api_key and
connect_timeout. modalities, turn_detection and input_audio_transcription also decide what the
model tells LiveKit it does, so they are fixed for a model once made. Controls you leave out are not
sent; values are checked against these ranges, or the server's from GET /v1/info.
The controls marked "needs session controls" need a satham server with session controls (its
GET /v1/info lists controls, as the server does since 2026-11-16); an older server refuses them
when the call starts. greeting and agent belong to the start of a call. Setting
input_audio_noise_reduction's mode alone resets strength_db to that mode's preset, so send both
to keep a custom strength; None leaves noise reduction at the server's default (on), and "none"
turns it off. agent is an optional
preset on the server and is not needed.
| Option | Range | Default | OpenAI equivalent | Notes |
|---|---|---|---|---|
instructions |
text, up to 16000 characters | none | - | the agent's role; from the LiveKit agent or Pipecat context in the adapters |
greeting |
text, up to 1000 characters | none | - | said first; without one the caller speaks first |
tools |
up to 128 functions | none | - | preview: needs a server with tool support |
tool_choice |
see notes | "auto" | tool_choice |
"auto", "none", "required" or one function |
agent |
text, up to 64 characters | none | - | optional: a preset agent on the server, such as a demo's |
model |
text, up to 64 characters | "satham-1" | model |
"satham-1" only today; needs session controls |
modalities |
list | ["audio", "text"] | modalities |
["audio", "text"], ["audio"], or ["text"]: words only, for your own TTS; needs session controls |
language |
auto, hi, ta, te, kn, bn, pa, en |
"auto" | - | |
language_switch |
auto, off, or None |
"auto" | - | |
voice_on_language_switch |
keep, native, or None |
"keep" | - | |
turn_detection.enabled |
True / False |
true | turn_detection=None |
false (or turn_detection=None): the client ends each turn; needs session controls |
turn_detection.type |
server_vad, semantic_vad |
"server_vad" | turn_detection.type |
needs session controls |
turn_detection.threshold |
0.1 to 0.95 | 0.5 | turn_detection.threshold |
the speech detector's threshold; needs session controls |
turn_detection.eagerness |
auto, low, medium, high |
"auto" | turn_detection.eagerness |
semantic_vad's end-of-turn wait; needs session controls |
turn_detection.prefix_padding_ms |
0 to 1000 | 300 | turn_detection.prefix_padding_ms |
needs session controls |
turn_detection.min_speech_ms |
50 to 1000 | 100 | - | needs session controls |
turn_detection.silence_duration_ms |
150 to 2000 | 350 | turn_detection.silence_duration_ms |
server_vad's end-of-turn wait; needs session controls |
turn_detection.create_response |
True / False |
true | turn_detection.create_response |
answer each turn at once; needs session controls |
turn_detection.interrupt_response |
True / False |
true | turn_detection.interrupt_response |
barge-in on or off; needs session controls |
turn_detection.barge_in.min_speech_ms |
0 to 2000 | 400 | - | needs session controls |
turn_detection.barge_in.min_probability |
0 to 1 | 0.8 | - | needs session controls |
turn_detection.barge_in.min_dbfs |
-90 to 0, or None |
-40 | - | needs session controls |
turn_detection.continue_within_ms |
0 to 5000, or None |
2000 | - | the caller carrying on in the same turn; null: off; needs session controls |
turn_detection.continue_max_heard_ms |
0 to 5000 | 1000 | - | needs session controls |
input_audio_noise_reduction.enabled |
True / False |
true | input_audio_noise_reduction={"type": "none"} |
false, "none" or {"type": "none"}: off; needs session controls |
input_audio_noise_reduction.mode |
near_field, far_field |
"near_field" | input_audio_noise_reduction.type |
resets strength_db to the mode's preset (12 or 30 dB) unless both are sent; needs session controls |
input_audio_noise_reduction.strength_db |
0 to 100 | 12 | - | needs session controls |
input_audio_noise_reduction.apply_to_transcription |
True / False |
false | - | needs session controls |
input_audio_transcription.enabled |
True / False |
true | input_audio_transcription=None |
transcript events to the client; needs session controls |
input_audio_transcription.code_mixed |
True / False |
true | - | English words in Latin script, and digits; needs session controls |
voice |
text, up to 64 characters | the language's | voice |
|
breaths |
True / False, or None |
off | - | |
natural_pauses |
True / False, or None |
off | - | |
variant |
"natural" / "warm", or None |
the agent's, else natural | - | the voice's sound, from the next reply |
continuation |
True / False, or None |
true | - | each phrase carries on from the one before; needs session controls |
speed |
1 to 1 | 1.0 | speed |
1.0 only today; needs session controls |
phrasing.first_phrase_max_chars |
1 to 120 | 120 | - | at least min_phrase_chars; needs session controls |
phrasing.min_phrase_chars |
1 to 120 | 20 | - | needs session controls |
normalise_numbers |
True / False |
true | - | numbers and amounts said as words; needs session controls |
pronunciations |
word to respelling | none | - | {word: respelling}, up to 200; needs session controls |
temperature |
0.6 to 1.2 | 0.7 | temperature |
needs session controls |
top_p |
0.05 to 1 | 0.8 | - | needs session controls |
max_response_output_tokens |
1 to 4096 | 320 | max_response_output_tokens |
or "inf"; never above the server's; needs session controls |
tone |
auto, conversational, happy, sad, excited, professional |
"auto" | - | "auto": the model picks; needs session controls |
repeat_guard |
True / False |
true | - | re-asks a reply that repeats a recent one; needs session controls |
drift_guard |
True / False |
true | - | keeps replies in the call's language; needs session controls |
Text mode, manual turns, tools, interruptions
modalities=["text"]. The agent's words go to theAgentSession's TTS, as with OpenAI's text mode; give the session atts.turn_detection=None. LiveKit's own turn detection (the session's VAD and turn detector) ends each turn: the plugin commits the caller's audio, andgenerate_reply()returns the reply.- Tools (preview: they need a satham server with tool support). Each call the agent makes runs
your tool; its result goes back to the server, which replies unless the tool returns
llm.ToolResult(..., reply_required=False). - Interruptions. The caller speaking over the agent interrupts it and the playout stops at once.
LiveKit mutes the caller for the first 3 s of agent speech by default (
AgentSession( aec_warmup_duration=3.0), off for SIP calls); set it toNonewhere echo cancellation is good. - Not supported: video, and reconnection (a dropped connection ends the call with an unrecoverable error).
Background sound
LiveKit plays the agent's audio only during replies, so satham's server-mixed background sound is not used
here: RealtimeModel refuses ambience with a sound, and turns a preset agent's off. AmbiencePlayer
plays it in the room instead, on LiveKit's own BackgroundAudioPlayer:
from livekit.agents import BuiltinAudioClip
ambience = satham.AmbiencePlayer(bed=BuiltinAudioClip.OFFICE_AMBIENCE, strength=1.0, typing=True)
await ambience.start(room=ctx.room, agent_session=session)
...
await ambience.aclose()
bed: a file or a LiveKit clip, looped;Nonefor typing alone. Each file is measured when the player starts, so strength 1.0 is -35 dBFS RMS for any sound (a linear gain; 0 to 2).- Typing (satham's bundled CC0 takes, or
typing_sounds=[...]) plays while the agent is"thinking", which is when a realtime agent's tools run, from 0.4 s in; it is capped atstrength, and fades in and out. It works with LiveKit's OpenAI plugin on satham's OpenAI-compatible endpoint too. ambience.update(strength=..., typing=..., typing_strength=...)changes it mid-call.
Text to speech
satham.TTS is kural-1, satham's text-to-speech model, as the TTS of an AgentSession that has an
LLM (and STT) of its own:
from livekit.plugins import satham
session = AgentSession(
stt=...,
llm=...,
tts=satham.TTS(voice="malar", language="ta", tone="conversational"),
)
- A sentence at a time, as it is made. LiveKit hands the TTS one sentence at a time; each is one
streamed request (
stream: true, raw PCM), so the agent starts speaking as soon as the first audio arrives. 24 kHz, mono. - Options:
urlandapi_key(orSATHAM_URLandSATHAM_API_KEY),voice,language,tone,pace,instructions,breaths,natural_pauses,variantandmodel, with the values of the SDK'sclient.audio.speech(see thesathampackage's README).tts.update_options(...)changes them from the next sentence (Nonegives one back to the default);instructionsandtone/paceexclude each other, so setting one clears the other. A pause marker in the text (<break time="0.5s"/>, 0.1 to 3 seconds) is spoken as that much silence, and a tone tag ([happy]) changes the tone to the end of its sentence.pronunciationsandpronunciation_dictionary_id(a dictionary fromtts.client.pronunciation_dictionaries) respell words in every sentence. - Errors are LiveKit's:
APIStatusErrorwith the HTTP status (401, 400 and 413 are not retried; 429 and 5xx are, as LiveKit's connection options say),APITimeoutError, andAPIConnectionErrorfor a network failure or a stream the server cut short.
Metadata
Release files for livekit-plugins-satham 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| livekit_plugins_satham-0.1.5.tar.gz | 23.7 kB | With provenance | Details for livekit_plugins_satham-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| livekit_plugins_satham-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for livekit_plugins_satham-0.1.5-py3-none-any.whl |
Total release size: 50.7 kB
Release files / livekit_plugins_satham-0.1.5.tar.gz
| Download URL | livekit_plugins_satham-0.1.5.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab2e65469c56d3db63924c5da307ef327f5b1d145d95f2c3ac1c608a0b062cc0
|
|
BLAKE2b-256 checksum How to use checksums |
3c6fc3221b773ddd5fcdc472fd7eb8cf4331edfb854d56eb2fb07ac792f1a34a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / livekit_plugins_satham-0.1.5-py3-none-any.whl
| Download URL | livekit_plugins_satham-0.1.5-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abd0ee63da3aae979578c655cafb93ed5a0e91e1bc4d151269e5ddda185d7c3d
|
|
BLAKE2b-256 checksum How to use checksums |
fe732e95919a3bc65bd6938ea54eb26ff4f75306958c10aab7067280d93b3a47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for livekit-plugins-satham 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for livekit_plugins_satham-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.