Naija Speech API

Speech and translation APIs for Hausa, Igbo, Yoruba and Nigerian English

Turn audio into transcripts and subtitles, text into speech, and translate between English, Hausa, Igbo and Yoruba, with one API key, for free.

Get started

Introduction

One API key gives you four tasks for Hausa, Igbo, Yoruba and Nigerian English: speech to text, text to speech, translation, and speech translation. Speech to text and text to speech follow OpenAI's API, so code written for OpenAI needs only a new base URL (see OpenAI compatibility).

Free for non-commercial use. For commercial use, email us; see licence.

LanguageCodeSpeech to textText to speechTranslation and speech translation
Hausaha✓✓✓ any pair
Igboig✓✓✓ any pair
Yorubayo✓✓✓ any pair
Nigerian Englishen✓✓✓ any pair

Base URL: https://asr.naijallm.com/v1. The three-letter codes hau, ibo, yor and eng work everywhere too.

Quickstart

  1. Create an account and verify your email.
  2. Create an API key in your dashboard. Keys start with nlb_.
  3. Save it as an environment variable and send a request:
export NAIJA_ASR_KEY="nlb_..."
curl https://asr.naijallm.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -F file=@voice-note.m4a \
  -F language=ha
curl https://asr.naijallm.com/v1/audio/speech \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "Ina kwana? Yau rana ce mai kyau.", "language": "ha"}' \
  -o hello.mp3
curl https://asr.naijallm.com/v1/translations \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Please call me when you get home.", "source": "en", "target": "yo"}'
curl https://asr.naijallm.com/v1/audio/translations \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -F file=@voice-note.m4a \
  -F language=ha \
  -F target=en

Each task's section below has the same examples in Python, JavaScript and the OpenAI SDK.

Authentication

Send your API key in the Authorization header of every request:

Authorization: Bearer nlb_...

Keep keys on your server. Don't put them in front-end code or mobile apps (see browser and mobile apps). You can have up to 10 keys, for example one per project, and revoke any of them from the dashboard. Limits apply to each key separately.

Playground

Try every task in your browser before writing code: record or upload audio, type text to hear it spoken, or translate a sentence. Each result shows the matching API call, ready to copy. The playground uses its own key on your account, with the same limits as any other key.

Open the playground

Changelog

Everything is under /v1. We add fields and endpoints without notice, so ignore fields you don't know; anything that would break existing code will get a new version.

  • 13 November 2026. Errors now include param and request_id, and every response has X-Request-Id. Wrong methods return 405. New error codes: invalid_body, invalid_text, invalid_input, invalid_authorization_header, unsupported_parameter. Translation and speech translation work between any two languages. Speech to text is more accurate on recordings over 30 seconds. Failed requests no longer count toward daily limits. Speech translation returns attribution. /v1/health reports speech translation.

Speech to text

Transcribe audio

POST/v1/audio/transcriptionsTry it →

Send a recording and the language spoken in it; get back the text.

curl https://asr.naijallm.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -F file=@audio.wav \
  -F language=ha
import os, requests

r = requests.post(
    "https://asr.naijallm.com/v1/audio/transcriptions",
    headers={"Authorization": f"Bearer {os.environ['NAIJA_ASR_KEY']}"},
    files={"file": open("audio.wav", "rb")},
    data={"language": "ha"},
)
r.raise_for_status()
print(r.json()["text"])
// Node 18+
import fs from "node:fs";

const form = new FormData();
form.append("file", new Blob([fs.readFileSync("audio.wav")]), "audio.wav");
form.append("language", "yo");

const r = await fetch("https://asr.naijallm.com/v1/audio/transcriptions", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.NAIJA_ASR_KEY}` },
  body: form,
});
if (!r.ok) throw new Error((await r.json()).error.message);
const { text } = await r.json();
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["NAIJA_ASR_KEY"], base_url="https://asr.naijallm.com/v1")

with open("audio.wav", "rb") as f:
    result = client.audio.transcriptions.create(model="ncair-asr", file=f, language="ig")
print(result.text)

Request

The body is multipart/form-data:

FieldTypeDescription
filefile, requiredWAV, MP3, M4A, FLAC, OGG or WebM. Any sample rate. Up to 25 MB and 5 minutes.
languagestring, required unless model is a per-language modelha, ig, yo or en. There is no automatic detection.
modelstringDefaults to ncair-asr, which picks the model for language. See languages and models.
response_formatstringjson (default), text (plain text), verbose_json, srt or vtt. See subtitles.
timestamp_granularities[]stringsegment only. Word timestamps aren't available yet.

Set the right language. There is no automatic language detection yet, and audio sent with the wrong language returns poor text, not an error.

Response

{
  "text": "A wannan lokaci na tarihin Tarayyan Turai, cocin Katolika ...",
  "language": "ha",
  "duration": 10.7,
  "model": "ncair-asr-hausa",
  "attribution": "Powered by NCAIR / N-ATLaS ASR models: ..."
}
FieldDescription
textThe transcript.
languageThe language you sent, as a two-letter code.
durationLength of the audio in seconds.
modelThe model that transcribed it.
attributionThe credit line to show with the transcript (see licence).

Recordings longer than 30 seconds are split at pauses and transcribed in parts, so a 5-minute file takes around 30 to 40 seconds.

Subtitles and timestamps

Set response_format to srt or vtt to get a subtitle file you can load into a video player or editor. Lines are at most 42 characters, two lines per caption.

curl https://asr.naijallm.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -F file=@interview.m4a \
  -F language=yo \
  -F response_format=srt > interview.srt
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["NAIJA_ASR_KEY"], base_url="https://asr.naijallm.com/v1")
with open("interview.m4a", "rb") as f:
    srt = client.audio.transcriptions.create(
        model="ncair-asr", file=f, language="yo", response_format="srt"
    )
open("interview.srt", "w").write(srt)
1
00:00:01,040 --> 00:00:03,150
Aristotle masanin falsafa ne.

2
00:00:03,890 --> 00:00:09,970
Ya yi tunanin cewa komai ya ƙunshi
cakuɗa ɗaya ...

For timestamps in JSON, use verbose_json. It returns the full text plus a segments list, the same shape as OpenAI's:

{
  "task": "transcribe",
  "language": "ha",
  "duration": 68.6,
  "text": "...",
  "model": "ncair-asr-hausa",
  "attribution": "Powered by NCAIR / N-ATLaS ASR models: ...",
  "segments": [
    {"id": 0, "start": 0.98, "end": 3.09, "text": "Aristotle masanin falsafa ne."},
    {"id": 1, "start": 3.82, "end": 10.94, "text": "Ya yi tunanin cewa komai ..."}
  ]
}

Segments follow pauses in the speech and are at most 12 seconds long. Word-level timestamps are not available yet. vtt is the same as srt with a WEBVTT header and . before the milliseconds.

Languages and models

LanguageCodeModelSource
Hausahancair-asr-hausaNCAIR1/Hausa-ASR
Igboigncair-asr-igboNCAIR1/Igbo-ASR
Yorubayoncair-asr-yorubaNCAIR1/Yoruba-ASR
Nigerian Englishenncair-asr-englishNCAIR1/NigerianAccentedEnglish

ncair-asr picks the right model from language; the per-language names are for code that needs a fixed model.

Accuracy

Word error rate (lower is better) on the FLEURS test set, from the Naija LLM Benchmarks leaderboard:

LanguageWER
Hausa35.0%
Igbo43.8%
Yoruba57.5%
Nigerian Englishnot measured yet

Yoruba drops to 30.6% when tone marks are ignored. Results vary with recording quality, accent and subject; review transcripts where accuracy matters. See how these models compare →

Text to speech

Generate speech

POST/v1/audio/speechTry it →

Send text and a language or voice; get back an audio file.

curl https://asr.naijallm.com/v1/audio/speech \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "Ina kwana? Yau rana ce mai kyau.", "language": "ha"}' \
  -o hello.mp3
import os, requests

r = requests.post(
    "https://asr.naijallm.com/v1/audio/speech",
    headers={"Authorization": f"Bearer {os.environ['NAIJA_ASR_KEY']}"},
    json={"input": "Ina kwana? Yau rana ce mai kyau.", "language": "ha"},
)
r.raise_for_status()
open("hello.mp3", "wb").write(r.content)
// Node 18+
import fs from "node:fs";

const r = await fetch("https://asr.naijallm.com/v1/audio/speech", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.NAIJA_ASR_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ input: "Ẹ kú àárọ̀, ṣé dáadáa ni?", language: "yo" }),
});
if (!r.ok) throw new Error((await r.json()).error.message);
fs.writeFileSync("hello.mp3", Buffer.from(await r.arrayBuffer()));
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["NAIJA_ASR_KEY"], base_url="https://asr.naijallm.com/v1")

with client.audio.speech.with_streaming_response.create(
    model="naija-tts", voice="igbo_female2", input="Ụtụtụ ọma. Kedụ ka ị mere?"
) as speech:
    speech.stream_to_file("hello.mp3")

Request

The body is JSON:

FieldTypeDescription
inputstring, requiredThe text to speak, up to 1,000 characters.
languagestringha, ig, yo or en. Required unless you set a voice, which implies its language.
voicestringA voice from the list. Defaults to the clearest voice for the language.
modelstringnaija-tts. Optional; the OpenAI SDK requires it.
response_formatstringmp3 (default), wav, opus (in an Ogg file) or flac.
speednumberOnly 1 for now. Other values return unsupported_parameter.

Response

The audio file itself (Content-Type audio/mpeg, audio/wav, audio/ogg or audio/flac), with headers X-Audio-Seconds (its length), X-Voice and X-Language. Errors come back as JSON. Long text is spoken sentence by sentence; each sentence takes about 1 to 3 seconds to generate.

Write numbers and abbreviations as words in the language you want, for example huɗu rather than 4. Yoruba and Igbo are spoken without tone marks, so some words may sound flat. Listen to the output before you publish it.

Voices

Each voice speaks one language. The first one listed is the default. GET /v1/audio/voices returns the same list, and ?language=ha filters it:

{"object": "list", "data": [{"id": "hausa_male2", "language": "ha", "default": true}, ...]}
LanguageVoices
Hausahausa_male2, hausa_female1, hausa_female2, hausa_male1, hausa_clear
Igboigbo_female2, igbo_male2, igbo_female1
Yorubayoruba_male2, yoruba_female2, yoruba_female1, yoruba_clear
Nigerian Englishidera, emma, jude, osagie, tayo, zainab, joke, regina, remi, umar, chinenye, onye

The _clear voices pronounce words most clearly but sound less natural. Listen to all of them in the playground.

Translation

Translate text

POST/v1/translationsTry it →

Send text with its language and the language you want; get back the translation.

curl https://asr.naijallm.com/v1/translations \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Please call me when you get home.", "source": "en", "target": "yo"}'
import os, requests

r = requests.post(
    "https://asr.naijallm.com/v1/translations",
    headers={"Authorization": f"Bearer {os.environ['NAIJA_ASR_KEY']}"},
    json={"text": "Please call me when you get home.", "source": "en", "target": "ha"},
)
r.raise_for_status()
print(r.json()["text"])
const r = await fetch("https://asr.naijallm.com/v1/translations", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.NAIJA_ASR_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ text: "Ụtụtụ ọma. Kedụ ka ị mere?", source: "ig", target: "en" }),
});
if (!r.ok) throw new Error((await r.json()).error.message);
const { text } = await r.json();

Request

The body is JSON:

FieldTypeDescription
textstring, requiredThe text to translate, up to 2,000 characters. Line breaks are kept.
sourcestring, requiredLanguage of the text: ha, ig, yo or en.
targetstring, requiredLanguage to translate into: ha, ig, yo or en. Any pair works; see languages.
modelstringnaija-translate. Optional.

Response

{
  "text": "Jọwọ pe mi nigbati o ba de ile.",
  "source": "en",
  "target": "yo",
  "model": "naija-translate",
  "characters": 33
}

characters is the length of your text, which counts toward the daily character limit.

Languages and quality

FromTo
English (en)Hausa, Igbo, Yoruba
Hausa, Igbo, YorubaEnglish (en)
Hausa, Igbo, YorubaEach other, for example Hausa to Yoruba

Between two Nigerian languages, for example Hausa to Yoruba, the text is translated into English and then out of it, in one request. Mistakes from both steps can add up, so check these translations more carefully.

Quality on the FLORES benchmark (chrF++, 0 to 100, higher is better; above about 50 is usually understandable, below 30 needs heavy correction):

LanguageFrom EnglishInto English
Hausa50.055.8
Igbo40.552.0
Yoruba26.444.7

Check before you publish. Translating into English is more accurate than translating out of it. Hausa is the strongest of the three; Yoruba and Igbo output often leaves out tone marks. Text is translated sentence by sentence, about 1 to 2 seconds each. Have a fluent speaker review medical, legal or financial text.

Speech translation

Translate speech

POST/v1/audio/translationsTry it →

Send a recording and the language you want; get back the translation as speech, or as text. Behind it, the audio is transcribed, the transcript is translated, and the translation is spoken, in one request. Any pair of Hausa, Igbo, Yoruba and English works. Between two Nigerian languages (Hausa to Yoruba, for example) the text goes through English, which adds a second or two.

# Hausa speech in, English speech out (MP3)
curl https://asr.naijallm.com/v1/audio/translations \
  -H "Authorization: Bearer $NAIJA_ASR_KEY" \
  -F file=@voice-note.m4a \
  -F language=ha \
  -F target=en \
  -F response_format=mp3 \
  -o english.mp3
import os, requests
from urllib.parse import unquote

r = requests.post(
    "https://asr.naijallm.com/v1/audio/translations",
    headers={"Authorization": f"Bearer {os.environ['NAIJA_ASR_KEY']}"},
    files={"file": open("voice-note.m4a", "rb")},
    data={"language": "yo", "target": "en", "response_format": "mp3"},
)
r.raise_for_status()
open("english.mp3", "wb").write(r.content)
print(unquote(r.headers["X-Transcript"]), "->", unquote(r.headers["X-Translation"]))
// Node 18+. Text only (the default): the transcript and its translation as JSON
import fs from "node:fs";

const form = new FormData();
form.append("file", new Blob([fs.readFileSync("voice-note.m4a")]), "voice-note.m4a");
form.append("language", "en");
form.append("target", "ig");
const r = await fetch("https://asr.naijallm.com/v1/audio/translations", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.NAIJA_ASR_KEY}` },
  body: form,
});
if (!r.ok) throw new Error((await r.json()).error.message);
const { transcript, text } = await r.json();

Request

The body is multipart/form-data, like speech to text:

FieldTypeDescription
filefile, requiredThe recording: WAV, MP3, M4A, FLAC, OGG or WebM, up to 25 MB and 60 seconds.
languagestring, requiredLanguage spoken in the recording: ha, ig, yo or en.
targetstringLanguage to translate into: ha, ig, yo or en. Default en.
response_formatstringjson (default) for text only; mp3, wav, opus or flac for speech.
voicestringA voice of the target language. Default: that language's first voice.
modelstringnaija-speech-translate. Optional.

Response

With response_format=json:

{
  "text": "Please call me when you get home.",
  "transcript": "Don Allah ka kira ni idan ka isa gida.",
  "language": "ha",
  "target": "en",
  "duration": 3.2,
  "model": "naija-speech-translate",
  "attribution": "Powered by NCAIR / N-ATLaS ASR models: ..."
}

With an audio format, the body is the speech. The headers X-Transcript and X-Translation carry the two texts, URL-encoded (decode them with decodeURIComponent or Python's urllib.parse.unquote), plus X-Voice, X-Language, X-Target and X-Audio-Seconds. If the translation is too long to speak (over 1,000 characters), you get 413 input_too_long: ask for json instead, or send a shorter clip.

What to expect. A request takes about 10 to 20 seconds. A mistake in the transcript carries into the translation, so check transcript when a translation looks wrong. When a step is down, the 503 response names it in X-Failed-Step (speech-to-text, translation or text-to-speech); if only the last step failed, X-Transcript and X-Translation are still sent. Nigerian Pidgin isn't supported yet. A request counts once toward the request limits, and its audio toward the daily audio minutes.

Reference

Limits

The API is free for non-commercial use. Each key has these limits. "Per day" means the last 24 hours, not a calendar day. Requests to every endpoint count toward the same request totals.

Requests per minute10
Requests per day1,000
Speech to text
Audio per day120 minutes
File size / length per request25 MB / 5 minutes
Text to speech
Characters per day100,000
Characters per request1,000
Translation
Characters per day100,000
Characters per request2,000
Speech translation
Audio per dayshared with speech to text
Length per request60 seconds

What counts. The per-minute limit counts every request, including ones that fail. The daily limits count only successful requests, so a request that fails (any 4xx or 5xx) doesn't use up your day. Characters are counted as Unicode code units, so a Yoruba letter with a tone mark can count as two.

Successful responses include X-RateLimit-Limit and X-RateLimit-Remaining for the per-minute limit. A 429 for the per-minute limit has Retry-After: 30; for a daily limit, Retry-After: 3600. Need higher limits? Email us.

Long text and audio

Every model has a limit on how much it can take in at once, and quality can drop well before that limit. So no model here ever sees a whole long request: we cut it into short pieces first, and join the results.

TaskWhat we do with long inputPer request
TranslationTranslated one sentence at a time (very long sentences are cut at about 60 words), then joined, keeping your line breaks. In our tests, quality doesn't change with sentence length.2,000 characters
Text to speechSpoken one sentence at a time (long sentences are cut at commas, about 24 words), joined with short pauses.1,000 characters
Speech to textAudio over 30 seconds is cut at pauses into pieces of up to 25 seconds (12 seconds when you ask for timestamps), transcribed one by one, and joined. Very short bits of sound are joined to a neighbouring piece, since models tend to invent words for them.25 MB, 5 minutes
Speech translationAs speech to text, then translation, then text to speech.60 seconds

Each sentence is translated on its own, without the sentences around it. In a long document a name, a term or a pronoun can come out differently from one sentence to the next, so check long documents for consistency.

If a request is over the limit, you get 413 with code input_too_long (text) or file_too_large / audio_too_long (audio). The message gives the length you sent and the limit. Nothing is cut off silently. To translate a longer document, send it in parts, for example one or a few paragraphs per request:

import os, requests

BASE = "https://asr.naijallm.com/v1"
H = {"Authorization": f"Bearer {os.environ['NAIJA_ASR_KEY']}"}

def translate(text, source, target):
    r = requests.post(f"{BASE}/translations", headers=H, json={"text": text, "source": source, "target": target}, timeout=300)
    r.raise_for_status()
    return r.json()["text"]

def translate_long(text, source, target, limit=2000):
    parts, cur = [], ""
    for para in text.split("\n"):
        if cur and len(cur) + len(para) + 1 > limit:
            parts.append(cur); cur = ""
        cur = f"{cur}\n{para}" if cur else para   # a single paragraph over the limit: split it at sentence ends
    parts.append(cur)
    return "\n".join(translate(p, source, target) for p in parts)

Errors

Errors return a JSON body in the same format as OpenAI. code is stable, so branch on it rather than on message, which may change. param names the field at fault (or is null), and request_id identifies the request: please quote it if you contact us. Every response also has an X-Request-Id header.

{"error": {"type": "invalid_request_error", "message": "source must be ha, ig, yo or en (or hau, ibo, yor, eng); got 'fr'.",
           "code": "unsupported_language", "param": "source", "request_id": "req_3f2a…"}}
StatusCodeMeaning
400missing_text, missing_input, missing_file, missing_language, missing_source, missing_targetA required field is missing.
400invalid_body, invalid_json, invalid_content_type, invalid_multipart, invalid_text, invalid_inputThe body isn't in the expected format: JSON objects for translation and text to speech (text fields as strings), multipart form data for audio.
400unsupported_language, same_language, language_model_mismatchThe language isn't one of ha, ig, yo, en, or doesn't fit the model. param says which field.
400model_not_found, voice_not_found, voice_language_mismatch, unsupported_response_format, unsupported_timestamp_granularity, unsupported_parameter, empty_fileA value isn't supported. The message lists the valid ones.
401missing_api_key, invalid_api_key, invalid_authorization_headerThe key is missing, wrong or revoked, or the header isn't Authorization: Bearer nlb_….
400bad_requestThe input was valid but couldn't be processed. The message says why.
403account_suspendedThe account can't use the API right now.
404, 405not_found, method_not_allowedNo such endpoint, or the wrong HTTP method (the Allow header gives the right one).
413input_too_long, file_too_large, audio_too_longOver the size limit for that task, or (speech translation) the translation is too long to speak. See long text and audio.
415unsupported_audioThe audio could not be decoded.
422no_speechSpeech translation: no speech was heard in the recording.
429rate_limit_exceededOver the per-minute limit. Retry after Retry-After seconds.
429daily_limit_exceededOver a daily request, audio or character limit. Retry-After is 3600.
429quota_exceededThe key has used its total quota (type insufficient_quota). Retrying won't help; email us.
500internal_errorSomething went wrong on our side. We're alerted automatically; retry, and contact us with the request_id if it keeps happening.
503service_unavailableTemporarily unavailable. We're alerted automatically. Retry later; GET /v1/health shows the status of each task.

type is one of invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, service_unavailable or server_error.

Retries and timeouts

  • Retry 429, 500 and 503, waiting longer each time (for example 2, 4, 8, 16 seconds), or as long as Retry-After says. Requests change nothing on our side, so retrying is safe.
  • Don't retry other 4xx errors without fixing the request: they will fail the same way.
  • Set a client timeout of at least 300 seconds. After a quiet period, the first request can take up to a minute or two while the models load; a 5-minute recording then takes about 30 to 40 seconds more.
import time, requests

def post_with_retry(url, tries=5, **kw):
    for i in range(tries):
        r = requests.post(url, timeout=300, **kw)
        if r.status_code not in (429, 500, 503) or i == tries - 1:
            return r
        time.sleep(int(r.headers.get("Retry-After", 2 ** (i + 1))))

Response headers

HeaderOnMeaning
X-Request-Idevery responseThe request's ID, also in error bodies as request_id.
X-RateLimit-Limit, X-RateLimit-Remainingsuccessful requestsThe per-minute limit and what's left of it.
X-Quota-Limit, X-Quota-Remainingkeys with a total quotaThe key's total requests and what's left.
Retry-After429Seconds to wait before retrying.
Allow405The HTTP method the endpoint takes.
X-Audio-Seconds, X-Voice, X-Languageaudio responsesLength of the audio, the voice used, and its language.
X-Target, X-Transcript, X-Translationspeech translation audioThe target language, and the two texts (URL-encoded).
X-Failed-Stepspeech translation 503Which step was unavailable.

All of these can be read from browser JavaScript.

Browser and mobile apps

The API allows requests from any web page (CORS), which is handy for prototypes. In a public app, don't ship your key: anyone can copy it from the page or the app and use your limits. Instead, call the API from your own server and have your app talk to that server. The playground works this way.

OpenAI compatibility

Point the official OpenAI SDKs at our base URL and use your Naija API key:

client = OpenAI(api_key=os.environ["NAIJA_ASR_KEY"], base_url="https://asr.naijallm.com/v1")
TaskSDK callModel
Speech to textclient.audio.transcriptions.create(...)ncair-asr
Text to speechclient.audio.speech.create(...)naija-tts
Translationno SDK method; call POST /v1/translations directlynaija-translate
Speech translationclient.audio.translations.create(model="naija-speech-translate", file=f, extra_body={"language": "ha", "target": "en"}). Formats json or audio only.naija-speech-translate

Differences from OpenAI: language is required for speech to text; voices are ours (see voices); OpenAI's speech translation only goes into English, ours goes between any pair and can return speech; word-level timestamps and streaming are not available yet.

Other endpoints

GET /v1/modelsThe available models. Each has a task: speech-to-text, text-to-speech, translation or speech-translation.
GET /v1/audio/voicesThe text-to-speech voices; ?language=ha filters them. See voices.
GET /v1/usageRequests in the last 24 hours and in total, across all your keys, and your per-key rate limits. Requires a key.
GET /v1/health{"online", "services": {"speech-to-text", "text-to-speech", "translation", "speech-translation"}, "checked_at"}, each true or false. No key needed.

Building with an AI coding assistant? Point it at /llms.txt, a plain-text summary of this API.

Policies

Licence and attribution

The speech-to-text models are released by NCAIR and Awarri Technologies for non-commercial use. Show this attribution wherever you use transcripts publicly. It is also returned with every transcript.

Powered by NCAIR / N-ATLaS ASR models: Awarri Technologies in an initiative of the Federal Ministry of Communications, Innovation and Digital Economy.

Speech from /v1/audio/speech, translations from /v1/translations and speech translations are free for non-commercial use. Speech translations start from a transcript, so show the attribution above with them too. For commercial use, email us. The hausa_clear and yoruba_clear voices are for non-commercial use only, because of their model's licence.

Models we use

The API is built on these openly released models. We thank their authors.

Used forModelByLicence
Speech to textNCAIR ASR (Hausa, Igbo, Yoruba, Nigerian English)NCAIR and Awarri TechnologiesNCAIR model licence, non-commercial
Translation (naija-translate)AfriqueQwen3.5-9B-50Langs-InstructMcGill NLPCC BY 4.0
Speech (naija-tts), most voicesYarnGPT2saheedniyiApache 2.0
Speech: the audio codec YarnGPT2 usesWavTokenizernovateurMIT
Speech: hausa_clear, yoruba_clearMMS-TTSMetaCC BY-NC 4.0, non-commercial

Speech translation (/v1/audio/translations) chains the speech-to-text, translation and speech models above. We may change the models behind each API model name as better ones become available; this list is kept up to date.

Privacy and data

  • Your audio and text aren't kept by us. We don't save them to our database or logs. To process audio, it's uploaded to our servers at Hugging Face as a temporary file, which is deleted within an hour.
  • What we log: for each request, the time, task, language, audio length, text length, status and how long it took, tied to your key. We use it for limits, usage figures and fixing problems.
  • We don't train models on your data and don't share it.
  • No outside AI services. Every request is handled by the models listed under models we use, on our own servers.

Acceptable use

By using the API you agree to these terms and to the NCAIR model licence. Do not use it for:

  • surveillance or monitoring people without their consent
  • profiling people or making decisions about them based on sensitive traits
  • fraud, impersonation or harassment, including speech that pretends to be a real person
  • military or weapons purposes
  • commercial products, without a licence from NCAIR / Awarri

Only send recordings and text you have the right to use (see privacy and data). Accounts that break these terms may be suspended. The service is provided as is, without warranty.