API Documentation

The official SDK for Nigerian Languages. Generate natural, expressive speech in Hausa, Igbo, Yoruba, and Nigerian Pidgin with 60+ speaker voices and real-time streaming.

Text to Speech

Generate natural speech from text in 4 Nigerian languages.

Real-time Streaming

Stream audio chunks as they're generated for long texts.

Voice Cloning

Clone any voice from a reference audio file in seconds.

Multi-language

Hausa, Igbo, Yoruba, and Nigerian Pidgin support.

Installation

Choose your preferred language SDK. All SDKs support the same features and API surface.

terminal

# Install the Python SDKpip install najalingo
Set NAJALINGO_API_KEY as an environment variable to avoid passing your key explicitly. Get your key at 9jalingo.com/dashboard.
Quick start

Get speech output in under 60 seconds. Pick your language and run the snippet below.

quickstart.py | .js | .sh

from najalingo import NaijaLingo client = NaijaLingo(api_key="nl-...") # Generate speech in Yorubaaudio = client.tts.generate(    "Bawo ni, I dey greet you!",    voice="yo")audio.save("greeting.wav")
Text-to-Speech

Generate audio from text using any supported language and speaker. Returns a WAV file by default. Use response_format="pcm" for raw 16-bit signed LE, 22050 Hz mono audio.

POST/v1/tts/generate

tts-generate

from najalingo import NaijaLingo client = NaijaLingo(api_key="nl-...") # Basic generationaudio = client.tts.generate("How you dey?", voice="pcm")audio.save("output.wav") # With specific speakeraudio = client.tts.generate(    "Nno, kedu ka I mere?",    voice="ig",    speaker="adaeze_ig")audio.save("adaeze_greeting.wav") # Advanced parametersaudio = client.tts.generate(    "Na so life be sometimes.",    voice="pcm",    temperature=0.8,    top_p=0.9,    repetition_penalty=1.2)
ParameterTypeDescription
text / first argstringThe text to synthesize into speech
voicestringLanguage code: ha, ig, yo, pcm
speakerstring?Speaker ID (e.g. adaeze_ig). Optional.
response_formatstring?wav (default) or pcm
temperaturefloat?Sampling temperature (0.0-1.0). Default: 0.7
top_pfloat?Nucleus sampling (0.0-1.0). Default: 0.9
repetition_penaltyfloat?Repetition penalty. Default: 1.0