Docs / Products

Speech-to-text

POST /v1/stt transcribes recorded audio with Waridi Sikia (sikia-1). It is built for the way people in East Africa actually talk: regional accents, Swahili–English code-switching and everyday Sheng.

For live audio, use the Streaming API instead.

Request

Upload a file as multipart/form-data, or send JSON with an audio_url we can fetch.

from waridi import Waridi

client = Waridi()

with open("simu.wav", "rb") as f:
    result = client.stt.transcribe(
        model="sikia-1",
        file=f,
        language="sw-TZ",
        code_switching=True,
        timestamps="word",
    )

for segment in result.segments:
    print(segment.start_ms, segment.language, segment.text)
import { Waridi } from "@waridi/sdk";
import { createReadStream } from "node:fs";

const client = new Waridi();

const result = await client.stt.transcribe({
  model: "sikia-1",
  file: createReadStream("simu.wav"),
  language: "sw-TZ",
  codeSwitching: true,
  timestamps: "word",
});

for (const segment of result.segments) {
  console.log(segment.startMs, segment.language, segment.text);
}
curl https://api.waridi.io/v1/stt \
  -H "Authorization: Bearer $WARIDI_API_KEY" \
  -F model=sikia-1 \
  -F language=sw-TZ \
  -F code_switching=true \
  -F timestamps=word \
  -F file=@simu.wav

Parameters

Field Type Required Description
model string yes sikia-1
file file one of Audio file up to 200 MB and 2 hours
audio_url string one of HTTPS URL to an audio file. Use instead of file
language string no sw-TZ (default), sw-KE or auto
code_switching boolean no Default true. Tags each segment with the language spoken
timestamps string no none, segment (default) or word
diarization boolean no Beta. Labels speakers as spk_0, spk_1 and so on
vocabulary string[] no Up to 100 words or phrases to bias toward, such as product names

Accepted input formats: WAV, MP3, M4A, Ogg/Opus, FLAC and WebM. Telephony audio at 8 kHz μ-law is accepted as WAV or raw with encoding=mulaw.

Response

{
  "id": "stt_01J9Z6R2M1",
  "model": "sikia-1",
  "language": "sw-TZ",
  "duration_ms": 6420,
  "text": "Nataka kuangalia salio langu, na pia ku-check kama malipo yamefika.",
  "segments": [
    {
      "start_ms": 0,
      "end_ms": 2310,
      "language": "sw",
      "text": "Nataka kuangalia salio langu,",
      "speaker": "spk_0"
    },
    {
      "start_ms": 2310,
      "end_ms": 6420,
      "language": "sw-en",
      "text": "na pia ku-check kama malipo yamefika.",
      "speaker": "spk_0"
    }
  ]
}
Field Description
text Full transcript as one string
segments[].language sw, en, or sw-en when a segment mixes both
segments[].words Present when timestamps is word. Each word has start_ms, end_ms and confidence
duration_ms Length of the input audio, used for billing

Code-switching

We do not translate English words into Swahili or drop them. If a caller says "nime-transfer pesa jana", you get exactly that. Sikia keeps Swahili verb prefixes attached to English stems, which is how people write it too.

Sheng support is experimental. Expect lower accuracy on fast Nairobi slang than on standard Swahili, and tell us where it falls short at hello@waridi.io.

Accuracy

sikia-1 is a preview model. We are building a public Swahili ASR benchmark and will publish results with methodology when it is ready, not before.