Code editor showing API integration on a laptop screen
Developer Guide
Back to blog
9jaLingo Team·Developer Experience·24 April 2026·6 min read

Building Your First African-Language Voice App with the 9jaLingo API

A practical walkthrough for developers: from getting your API key to streaming Hausa, Yoruba, or Pidgin speech in your app — in under 15 minutes.

#API#Developer Guide#TTS#Voice Apps#Tutorial

Why Voice Matters for Your African-Market App

If you're building a product for Nigeria, Ghana, or any West African market, voice is not a nice-to-have — it is table stakes. Literacy rates vary, bandwidth is expensive, and users overwhelmingly prefer audio content when available.

The 9jaLingo API makes it straightforward to add natural, human-quality speech in Hausa, Igbo, Yoruba, and Nigerian Pidgin to any web or mobile app. This guide walks you through the entire process from scratch.


Step 1 — Get Your API Key

  1. Sign up for a 9jaLingo account — there is a free Starter plan.
  2. In your dashboard, navigate to API Keys and generate a new key.
  3. Store it safely — treat it like a password.

Step 2 — Your First TTS Request

The 9jaLingo API is OpenAI-compatible. If you've used openai.audio.speech.create, the call signature is identical — just swap the base URL and add your language:

python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_9JALINGO_API_KEY",
    base_url="https://api.9jalingo.org/v1",
)

response = client.audio.speech.create(
    model="9jalingo-1",
    voice="amara",          # Igbo female voice
    input="Ọ dị mma, anyị nọ ọnọdụ ọma.",
    extra_body={"language": "ig"},
)

with open("output.mp3", "wb") as f:
    f.write(response.content)

Run this and you'll have an MP3 file with natural Igbo speech in seconds.


Step 3 — Stream Audio in Real Time

For conversational apps and voice assistants, streaming is essential — it lets you start playing audio before the full synthesis is complete, dramatically reducing perceived latency.

python
with client.audio.speech.with_streaming_response.create(
    model="9jalingo-1",
    voice="ibrahim",        # Hausa male voice
    input="Sannu da zuwa 9jaLingo. Muna farin cikin taimakon ku.",
    extra_body={"language": "ha"},
) as response:
    response.stream_to_file("streaming_output.mp3")

Our streaming endpoint returns the first audio chunk in under 300 ms on average.


Step 4 — Pick the Right Voice

We offer 240+ voices across language groups. Here's a quick guide:

LanguageExample VoiceGenderNotes
HausaibrahimMaleNorthern accent
HausafatihaFemaleStandard Kano tone
YorubaadeolaFemaleLagos Yoruba
IgboamaraFemaleAnambra dialect
PidginchukwumaMaleNigerian Pidgin

Browse the full voice catalogue in your dashboard.


Step 5 — Voice Cloning

If you want your brand's voice — or a specific person's voice — you can clone it using our cloning endpoint:

python
with open("reference_voice.wav", "rb") as ref:
    response = client.audio.speech.create(
        model="9jalingo-clone-1",
        input="E kaaro, welcome to our customer service line.",
        extra_body={
            "language": "yo",
            "reference_audio": ref.read().hex(),
        },
    )

Cloning requires as little as 30 seconds of reference audio.


What to Build Next

Here are three ideas you can ship in a weekend using the 9jaLingo API:

  1. IVR system in local language — Replace robotic English menus with warm, natural Hausa or Pidgin greetings.
  2. E-learning narration — Convert lesson text into spoken audio for students with limited literacy or connectivity.
  3. Accessibility reader — Let users on your news or e-commerce site listen to content in their preferred Nigerian language.

Need help? Contact our developer support team or check the full API docs.

9

9jaLingo Team

Developer Experience · 9jaLingo