Why swaramFeatures DocsSign in
View as .md

Sessions & context

A session is one connection. You configure it once, at the start — your instructions, voice, and tools — and that configuration applies to the whole call. This is identical in both modes.

Configure at the start

Send a session.update as your first message right after connecting (or lock the settings into a browser token). The settings are fixed once the conversation begins, so set them before you start streaming audio.

JSON
{
  "type": "session.update",
  "session": {
    "instructions": "You are a helpful Malayalam tutor. Keep replies short.",
    "voice": "mal-female",
    "tools": []
  }
}

The server echoes the effective configuration back as a session.updated event.

Settings

Setting What it does
instructions Your system prompt — the persona, the policy, the tone, and any context.
voice The Malayalam voice: mal-female (default) or mal-male.
tools Actions the model can call — see Function calling.
tool_choice auto (default), none, or required.
turn_detection Automatic turn-taking (default) — swaram replies when the user stops speaking.

Replies are speakable Malayalam by default. swaram always returns natural, conversational Malayalam written for the ear — numbers, units, and dates as words, no markdown or formatting. Your instructions layer on top of that: they set the persona, behaviour, and length (replies default to one or two sentences; ask for a longer or different style in your instructions).

Adding your data

swaram is the voice — your data stays yours. Put the information you want it to use into the instructions, or give it a tool to look things up at the moment it's needed. Conversations aren't stored; you bring your context each session.

Voices

Two Malayalam voices, the same in both modes:

voice
mal-female Female voice (default).
mal-male Male voice.

Why "at the start"?

Setting configuration once and locking it keeps both modes behaving identically and predictably for the whole call. If you need different instructions or tools, start a new session with the new configuration.

← All docs