Views
No views yet
1import requests
2import base64
3
4url = "https://api-inference.huggingface.co/models/pendalorian/dia-1.6b-african-2025"
5headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
6
7data = {
8 "inputs": "Khoe gei ra, Buffr financial services khoeb",
9 "language": "naq",
10 "voice_settings": {
11 "temperature": 0.7,
12 "max_tokens": 1024
13 }
14}
15
16response = requests.post(url, headers=headers, json=data)
17result = response.json()
18
19# Decode audio
20audio_data = base64.b64decode(result["audio_base64"])
21with open("output.wav", "wb") as f:
22 f.write(audio_data)Input: "Buffr ǀhui-ǀhui ǁkhab-tsâ ge"
Output: Natural Nama speech with click consonantsInput: "Moro, Buffr ombura yomukazendu"
Output: Authentic Herero pronunciation