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.
Choose your preferred language SDK. All SDKs support the same features and API surface.
terminal
# Install the Python SDKpip install najalingo
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")
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.
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)
| Parameter | Type | Description |
|---|---|---|
| text / first arg | string | The text to synthesize into speech |
| voice | string | Language code: ha, ig, yo, pcm |
| speaker | string? | Speaker ID (e.g. adaeze_ig). Optional. |
| response_format | string? | wav (default) or pcm |
| temperature | float? | Sampling temperature (0.0-1.0). Default: 0.7 |
| top_p | float? | Nucleus sampling (0.0-1.0). Default: 0.9 |
| repetition_penalty | float? | Repetition penalty. Default: 1.0 |