Skip to content

Khaya SDK

PyPI Python versions CI License

Python SDK for the Khaya AI API, built on GhanaNLPtranslation, automatic speech recognition (ASR), and text-to-speech (TTS) across 30+ African languages.

Install

pip install khaya

Quick start

import os
from khaya import KhayaClient

with KhayaClient(os.environ["KHAYA_API_KEY"]) as khaya:
    result = khaya.translate("Hello, how are you?", "en-tw")
    print(result.text)  # the Twi translation

Ready to go further? Head to the Getting Started guide, or browse the language reference.