Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.1.1] — Unreleased¶
Added¶
- Typed result objects:
TranslationResult,TranscriptionResult,SynthesisResult— methods no longer return rawhttpx.Response. SynthesisResult.save(path)helper for writing audio bytes to a file.TranslationResult.source_languageandTranslationResult.target_languageattributes.- Structured logging across all modules using
logging.getLogger(__name__): khaya.services.base_api— HTTP attempt number, retryable status codes, backoff duration, transport errors, successful response status.khaya.services.translation— character count and language pair per request.khaya.services.asr— language and audio file size per request.khaya.services.tts— character count, language, and output audio size per request.NullHandleron thekhayalogger in__init__.py— SDK is silent by default.- MkDocs Material documentation site with guides, API reference, and architecture diagrams.
Changed¶
translate(),atranslate()now returnTranslationResultinstead ofhttpx.Response.transcribe(),atranscribe()now returnTranscriptionResultinstead ofhttpx.Response.synthesize(),asynthesize()now returnSynthesisResultinstead ofhttpx.Response.- API base URL default kept as
https://translation-api.ghananlp.org.
Removed¶
logger.py— logging setup moved to__init__.py.ABCbase class fromBaseApi(no abstract methods existed).
[0.1.0] — 2026-03-08¶
Added¶
KhayaClientwith synchronous and asynchronous API for translation, ASR, and TTS.translate(text, language_pair)— text translation across African language pairs.transcribe(audio_file_path, language)— speech-to-text from.wavaudio.synthesize(text, language)— text-to-speech returning raw audio bytes.- Async counterparts:
atranslate,atranscribe,asynthesize. - Sync and async context manager support (
with/async with). - Structured exception hierarchy:
APIError,AuthenticationError,RateLimitError,TranslationError,TTSGenerationError,ASRTranscriptionError. - Exponential backoff retry logic with jitter for transient failures (429, 5xx).
Retry-Afterheader support for rate-limit responses.- Pydantic-based
Settingswith HTTPS enforcement and strict field validation. - Language validation warnings for unknown language codes.
py.typedmarker for PEP 561 type distribution.- MIT license.