> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rumik.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# python SDK

> the official rumik-ai python package for silk text-to-speech.

`rumik-ai` is the official python client for the silk TTS API. it gives you three ways
to turn text into speech, a single batch call, a real-time stream, or a long-lived
voice-agent session, all behind one small, fully typed client. you write a few lines
of python instead of managing HTTP requests and websocket frames yourself.

```python theme={null}
from rumikai import Rumik

client = Rumik()  # reads RUMIK_API_KEY
audio = client.speech.create(text="[happy] Namaste! Kaise hain aap?", model="muga")
audio.save("hello.wav")
```

<Note>
  the package installs as `rumik-ai` but you **import `rumikai`**. the API key env var
  is `RUMIK_API_KEY`.
</Note>

## three ways to synthesize

<CardGroup cols={3}>
  <Card title="batch" icon="file-audio" href="/sdk/synthesis#batch-synthesis">
    one call in, one WAV out. best for pre-generated audio.
  </Card>

  <Card title="streaming" icon="waveform-lines" href="/sdk/synthesis#streaming">
    raw PCM over a websocket as it is generated. lowest time to first audio.
  </Card>

  <Card title="sessions" icon="comments" href="/sdk/synthesis#sessions-and-voice-agents">
    a persistent connection with barge-in, for real-time voice agents.
  </Card>
</CardGroup>

## highlights

* **sync and async** clients (`Rumik`, `AsyncRumik`) with the same surface.
* **fully typed**: ships `py.typed`, so type checkers see everything.
* **automatic retries** on transient errors with jittered backoff, honoring `Retry-After`.
* **two models**: expressive `muga` and faster `mulberry`.
* **24 kHz mono 16-bit PCM** everywhere; `create` returns a ready-to-play WAV.

## requirements

python **3.9 to 3.13**. streaming and sessions need the `ws` extra
(`pip install "rumik-ai[ws]"`).

## next

<CardGroup cols={2}>
  <Card title="quickstart" icon="rocket" href="/sdk/quickstart">
    install, authenticate, and synthesize your first clip.
  </Card>

  <Card title="synthesis" icon="book-open" href="/sdk/synthesis">
    batch, streaming, sessions, and async.
  </Card>
</CardGroup>
