Skip to main content

pipecat-satham

satham's realtime speech-to-speech model (satham-1) as a Pipecat service. SathamRealtimeLLMService stands in for STT, LLM and TTS: your context brings the agent's instructions and tools, and satham hears the caller, ends turns, replies in speech and handles barge-in. KuralTTSService brings kural-1, satham's text-to-speech model, to pipelines with an LLM of their own (Text to speech).

Pipecat 1.16; Python 3.11+. (Pipecat runs only in Python, so there is no Node version.)

pip install pipecat-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 pipecat.frames.frames import LLMRunFrame
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.worker import PipelineParams, PipelineWorker
from pipecat.processors.aggregators.llm_context import LLMContext
from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair

from pipecat_satham import SathamRealtimeLLMService

llm = SathamRealtimeLLMService(
    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",
)
# The context's system message is the call's instructions.
context = LLMContext(
    [{"role": "system", "content": "You are Asha, who books site visits for Example Homes."}]
)
user, assistant = LLMContextAggregatorPair(context)
pipeline = Pipeline([transport.input(), user, llm, transport.output(), assistant])
worker = PipelineWorker(pipeline, params=PipelineParams(audio_in_sample_rate=16_000))


@transport.event_handler("on_client_connected")
async def on_connected(transport, client):
    await worker.queue_frames([LLMRunFrame()])  # starts the call; the agent greets
  • The call starts with the first LLMContextFrame (or LLMRunFrame), as with any Pipecat realtime service, and the agent speaks first: the greeting if there is one, else a reply from its instructions. The context's system message is the call's instructions (or pass instructions=), and the context's tools join the service's. Caller audio before the call starts is dropped.
  • Audio goes in as 16 kHz mono; the agent's speech comes out as TTSAudioRawFrames between TTSStartedFrame and TTSStoppedFrame, with its words as TTSTextFrames.
  • Turns and interruptions. satham's speech start and stop become proposed user turns, which the context aggregator's external turn strategies turn into user turns and interruptions. An interruption from anywhere else in the pipeline cancels the agent's reply.
  • Transcripts go upstream as InterimTranscriptionFrame / TranscriptionFrame; both sides of the conversation land in the LLMContext.
  • modalities=["text"] sends the agent's words as LLMTextFrames for a TTS service of your own; turn_detection=None leaves turns to the pipeline's VAD and turn strategies (each UserStoppedSpeakingFrame ends the caller's turn).

Controls

Every keyword of the constructor besides url, api_key, instructions, tools, tool_choice, connect_timeout and start_audio_paused is a control; other keywords go to Pipecat's LLMService. Mid-call, await llm.update_options(...) changes any control, as does an LLMUpdateSettingsFrame with SathamRealtimeLLMService.Settings(controls={...}) (its temperature, top_p and max_tokens map to satham's). 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

Tools (preview)

Preview: tools need a satham server with tool support.

from pipecat.adapters.llm.schemas.function_schema import FunctionSchema
from pipecat.adapters.llm.schemas.tools_schema import ToolsSchema
from pipecat.frames.frames import EndTaskFrame, FunctionCallResultProperties
from pipecat.processors.frame_processor import FrameDirection

END_CALL = FunctionSchema(
    name="end_call",
    description="End the call when the conversation is over. Say a short goodbye in the same turn.",
    properties={"reason": {"type": "string"}},
    required=[],
)


async def end_call(params):
    await params.result_callback("ended", properties=FunctionCallResultProperties(run_llm=False))
    await params.llm.push_frame(EndTaskFrame(), FrameDirection.UPSTREAM)


llm = SathamRealtimeLLMService(..., tools=ToolsSchema(standard_tools=[END_CALL]))
llm.register_function("end_call", end_call)

Each call the agent makes runs the handler registered with register_function; the agent replies to its result unless the result carries FunctionCallResultProperties(run_llm=False). A cancelled call is answered with CANCELLED and no reply. LLMSetToolsFrame replaces the tools mid-call.

Event handlers: on_session_updated(service, event) when the call's language changes, and on_server_event(service, event) for every satham event. Not supported: LLMMessagesAppendFrame (satham keeps the conversation itself).

Text to speech

KuralTTSService is kural-1, satham's text-to-speech model, as a Pipecat TTS service, for a pipeline with an LLM of its own:

from pipecat_satham import KuralTTSService

tts = KuralTTSService(voice="malar", language="ta", tone="conversational")
pipeline = Pipeline([transport.input(), stt, user, llm, tts, transport.output(), assistant])
  • A sentence at a time, as it is made. Pipecat gathers the LLM's words into sentences; each is one streamed request (stream: true, raw PCM), and its audio goes downstream as TTSAudioRawFrames as it arrives, between the TTSStartedFrame and TTSStoppedFrame Pipecat adds. kural-1 speaks 24 kHz mono; the service's output rate is the pipeline's (or sample_rate=), and Pipecat resamples when the two differ.
  • Interruptions cancel the request in flight and cut its connection, so the server stops.
  • Options: url and api_key (or SATHAM_URL and SATHAM_API_KEY), voice, language (a code, or a Pipecat Language), tone, pace, instructions, breaths, natural_pauses, pronunciations, pronunciation_dictionary_id, variant, model and timeout, with the values of the SDK's client.audio.speech (see the satham package's README); other keywords go to Pipecat's TTSService. A TTSUpdateSettingsFrame(delta=KuralTTSService.Settings(...)) changes them from the next sentence; 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 satham.Client(...).pronunciation_dictionaries) respell words in every sentence.
  • Errors come as ErrorFrames with Pipecat's categories. A wrong key or a refused setting (such as an unknown voice) leaves the service unusable, as Pipecat does with any permanent error; a sentence the server will not take (too long), a busy server (429) or a network failure does not.

Metadata

Release files for pipecat-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 pipecat-satham 0.1.4
File Size Uploaded Provenance Actions
pipecat_satham-0.1.4.tar.gz 19.1 kB With provenance Details for pipecat_satham-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 40.5 kB

Release files / pipecat_satham-0.1.4.tar.gz

Download URL pipecat_satham-0.1.4.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e61f818813b928992391fdf8e3f74d78d21126f52aca7d9448aaa50733621215
BLAKE2b-256 checksum
How to use checksums
fb2ce17e5455de36155d5dad76f7111dc790d3c045f3edf126f35c495277645a
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 / pipecat_satham-0.1.4-py3-none-any.whl

Download URL pipecat_satham-0.1.4-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0505eadebb8de133b771dd2780fe6ceb14427a7731fa6462abef86d5b3fd104a
BLAKE2b-256 checksum
How to use checksums
c5a34e0546ba1f6b446554f8fe28985817bfbb99829caa03059a9ac1832cabd4
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 pipecat-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 pipecat_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