Skip to main content

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 instructions become 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. Otherwise session.generate_reply(instructions=...) asks for a reply now (satham's response.create; use it in on_enter to open the call), and session.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 (a satham.SessionUpdated: the language, and the reason caller, reply or client).

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 the AgentSession's TTS, as with OpenAI's text mode; give the session a tts.
  • 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, and generate_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 to None where echo cancellation is good.
  • Not supported: video, and reconnection (a dropped connection ends the call with an unrecoverable error).

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: url and api_key (or SATHAM_URL and SATHAM_API_KEY), voice, language, tone, pace, instructions, breaths, natural_pauses, variant and model, with the values of the SDK's client.audio.speech (see the satham package's README). tts.update_options(...) changes them from the next sentence (None gives one back to the default); instructions and tone/pace exclude 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. pronunciations and pronunciation_dictionary_id (a dictionary from tts.client.pronunciation_dictionaries) respell words in every sentence.
  • Errors are LiveKit's: APIStatusError with the HTTP status (401, 400 and 413 are not retried; 429 and 5xx are, as LiveKit's connection options say), APITimeoutError, and APIConnectionError for a network failure or a stream the server cut short.

Metadata

Release files for livekit-plugins-satham 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-plugins-satham 0.1.4
File Size Uploaded Provenance Actions
livekit_plugins_satham-0.1.4.tar.gz 20.5 kB With provenance Details for livekit_plugins_satham-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-satham 0.1.4
File Interpreter ABI Platform Actions
livekit_plugins_satham-0.1.4-py3-none-any.whl Python 3 none any Details for livekit_plugins_satham-0.1.4-py3-none-any.whl

Total release size: 43.6 kB

Release files / livekit_plugins_satham-0.1.4.tar.gz

Download URL livekit_plugins_satham-0.1.4.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9e150a86a48109cc8d8852eb9bc15fa6106aaf3af6dde19f4882f0762eb757b6
BLAKE2b-256 checksum
How to use checksums
09d68c5572cbd5fea643877410abd0d1e4a6be49f1ac262c41f4ed6a66cd2bb3
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 19, 2026.

Transparency log

Release files / livekit_plugins_satham-0.1.4-py3-none-any.whl

Download URL livekit_plugins_satham-0.1.4-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60de8a7aaae4b9d24bd40b84045da38892ecee6e3d0f01686898c613b0753bc3
BLAKE2b-256 checksum
How to use checksums
ec3ef3910152c98e40577395034e601eca4b55854a8b973b8c7eace9a3550a5b
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 19, 2026.

Transparency log

Security for livekit-plugins-satham 0.1.4

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.

Select from 2 files

Attestation for livekit_plugins_satham-0.1.4.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 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page