DocumentationQuickstart

Audio & Voice

The Voice product (NAAD model) covers text-to-speech, speech-to-text, translation, voice changing and voice isolation. Endpoints follow the OpenAI Audio API where one exists, plus a few NAAD-native ones.

Text to Speech

POST https://platform.oogam.in/v1/audio/speech — returns audio bytes (audio/wav).

bash
curl https://platform.oogam.in/v1/audio/speech \
  -H "Authorization: Bearer $SETU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "naad-tts-v1",
    "voice": "aditi",
    "input": "नमस्ते, आपका स्वागत है।",
    "speed": 1.0,
    "stability": 0.5,
    "style": 0.35
  }' --output speech.wav

Optional generation controls: speed (0.5–2.0, default 1.0), stability (0–1, default 0.5), and style (0–1, default 0.35). Stability affects consistency; style affects delivery exaggeration.

Conversation TTS

POST https://platform.oogam.in/v1/audio/conversation — multi-speaker dialogue into one combined WAV. Prefer this over calling /audio/speech N times and stitching. Keep a stable voice_id per character.

bash
curl https://platform.oogam.in/v1/audio/conversation \
  -H "Authorization: Bearer $SETU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "SAN",
    "conversation_id": "conv_demo_001",
    "segments": [
      { "voice_id": "male_voice_1", "text": "नमस्ते मित्र।" },
      { "voice_id": "male_voice_2", "text": "नमस्ते। अहं कुशली अस्मि।" }
    ]
  }' --output conversation.wav

Long dialogues may return 202 with a job id — poll GET /v1/audio/conversation-status/{id} until the WAV is ready. Optional turn_gap_s / same_speaker_gap_s control silence between turns.

Transcriptions (Speech to Text)

POST https://platform.oogam.in/v1/audio/transcriptions — multipart upload of an audio file.

bash
curl https://platform.oogam.in/v1/audio/transcriptions \
  -H "Authorization: Bearer $SETU_API_KEY" \
  -F model="naad-stt-v1" \
  -F language="HIN" \
  -F file="@audio.wav" \
  -F response_format="json"

language is required — a 3-letter code (e.g. HIN, GUJ, TAM); the model does not auto-detect it. Optional response_format: text, json (default), verbose_json (segments + timestamps), dialogue_json (speaker turns with HH:MM:SS.mmm clocks — use with diarize=true), or srt (subtitle file).

json
{ "text": "This is the transcribed text." }

Translations

POST https://platform.oogam.in/v1/audio/translations — transcribe and translate speech to English. Same multipart format as transcriptions (the required language is the source language of the audio).

Speech to Speech (batch re-voice)

POST https://platform.oogam.in/v1/audio/speech-to-speech — transform uploaded speech into a target NAAD voice (multipart file + voice). Returns audio bytes.

Live talk (realtime conversational STS)

The dashboard Live talk studio uses the NAAD realtime WebSocket. LLM / OpenRouter run on the NAAD backend — not in this platform. Endpoint: wss://naadapi.dwetlabs.com/realtime/v1/realtime. Mic audio is PCM16 LE mono @ 16 kHz; agent audio is PCM16 LE mono @ 24 kHz. Control events accepted by the socket: set_lang, set_voice, start_utterance, stop_utterance, reset. Optional NEXT_PUBLIC_NAAD_STS_TOKEN is sent as ?token= when the API enables STS_WS_TOKEN.

Knowledge base grounding

The realtime socket takes no context or system prompt, so a knowledge base cannot be pushed to it. When a KB is selected, the platform keeps NAAD for voice detection and transcription and generates the answer itself: the transcript is posted to /api/naad/live-talk-reply, which loads the KB server-side (the platform default setu-platform-default, or the org profile saved via /api/naad/live-talk-kb), asks the chat model, and speaks the answer. NAAD’s own turn is cancelled as soon as the transcript arrives, so its reply never competes for the socket. Grounded replies therefore need a live chat upstream configured for the Sutra product.

The reply streams back as NDJSON so speech starts on the first sentence instead of the full answer: each line is one event — {"type":"text","text":…} for a finished sentence, {"type":"audio","seq":n,"b64":…} for its audio (played in seq order), {"type":"notice","code":…} when audio is unavailable but the text stands, and {"type":"done",…} with per-stage timings. Setup failures (no KB saved, no chat upstream) still answer with a normal JSON error before the stream begins.

Voice Changer

POST https://platform.oogam.in/v1/audio/voice-changer — re-voice an uploaded file into a target voice while preserving content and timing. Returns audio bytes.

Voice Isolator

POST https://platform.oogam.in/v1/audio/isolate — remove background noise and isolate clean speech from an uploaded file. Returns audio bytes.

List voices

GET https://platform.oogam.in/v1/voices — returns the voice catalog and available voice models.

json
{
  "voices": [
    { "id": "aditi", "name": "Aditi", "language": "Hindi", "languageCode": "hi-IN", "gender": "female" }
  ],
  "models": [ { "id": "naad-tts-v1", "kind": "tts" } ]
}

TTS is billed per character; STT, translation, voice-changer and isolation are billed per second of audio. See Models.