The TTS adapter uses the public Ghana-NLP Africa TTS Gradio API.
Space Secret
If the Ghana-NLP TTS Space requires authentication, add this in Settings → Variables and secrets:
HF_TOKEN=hf_your_token_here
Never put the token in app.py or commit it to the repository.
Deployment
Create a new Hugging Face Gradio Space.
If the account offers it, select ZeroGPU as the hardware.
Upload every file in this repository to the root of the Space.
Make sure app.py is at the repository root.
Add HF_TOKEN as a Space Secret if required by the TTS backend.
Commit the files and wait for the Space to build.
Open the app and test a short 5–10 second recording first.
Why this is not Gradio Lite
Do not open or configure this project as a static/Gradio-Lite browser application. The translator needs server-side Python, PyTorch, Transformers and model inference.
The ASR and NLLB models are loaded at application startup and placed on CUDA so ZeroGPU can pack their weights efficiently. Actual inference occurs inside the GPU-decorated function.
User interface
Microphone input
Audio upload
Source language selection
Target language selection
Language swap button
Female / Male Low / Male High voice selection
Recognized speech display
Translated text display
Translated audio playback
Audio download through the Gradio audio component
Important ASR limitation
DONDO is language-conditioned. The current checkpoints require the source language to be selected; this version does not claim automatic language identification.
The backend is separated into ASR, translation and TTS modules so it can later be connected to the planned hardware translator, microphone/mixer input and professional audio output system.