Developer platform
Playground
Start a conversation
In Derja, French, or both.
- First token
- –
- Total
- –
- Chunks
- –
curl https://punica.tn/api/v1/chat/completions \
-N \
-H "Authorization: Bearer $BAARCHA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hannibal",
"messages": [
{
"role": "user",
"content": "شكونك إنتي بالضبط؟"
}
],
"temperature": 0.7,
"max_tokens": 512,
"stream": true
}'Runs against the public v1 API with your key. This page executes the same call keylessly as a demo.
Transcribe your audio
Record or upload speech in Tunisian Derja.
or or drop it here
MP3, WAV, M4A and more, up to 8 MB.
- Latency
- –
curl https://punica.tn/api/v1/audio/transcriptions \
-H "Authorization: Bearer $BAARCHA_API_KEY" \
-F file=@'female-street.mp3' \
-F model=fennecRuns against the public v1 API with your key. This page executes the same call keylessly as a demo.
Turn text into speech
Write in Tunisian Derja, pick a voice, add an expression where it belongs, and listen.
Dido reads Tunisian Derja; tags like [laughter] are performed, not spoken.
🇹🇳 Tunisian Derja. The examples on the right follow its conventions.
Dialects, styles and expression tags
Dialect is sent as language, an ISO 639-3 id. Dido is one model trained on these six and conditioned per request; text with no language is read as Tunisian. A built-in voice that carries its own dialect model ignores it.
Style is one of the engine's instruct phrases. The voice default keeps each voice's tuned delivery; Natural clears it.
Expressions are bracketed tags the engine performs instead of reading: [laughter], [sigh], [surprise-ah], [surprise-oh], [question-en], [confirmation-en], [dissatisfaction-hnn]. Type [ in the box to pick one, or use the menu. Anything else in brackets is read aloud as text.
- First byte
- –
- Total
- –
curl https://punica.tn/api/v1/audio/speech \
-H "Authorization: Bearer $BAARCHA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dido",
"input": "الشارع مسكر اليوم على خاطر الأشغال، لازم نعملو دورة طويلة باش نوصلو للخدمة في الوقت.",
"voice": "female",
"language": "aeb",
"response_format": "mp3"
}' \
--output speech.mp3Runs against the public v1 API with your key. This page executes the same call keylessly as a demo.
Clone a voice with the API
curl https://punica.tn/api/v1/voices \
-H "Authorization: Bearer $BAARCHA_API_KEY" \
-F name='صوتي' \
-F consent=true \
-F sample=@'take-one.wav'Returns a vc_… id to use as voice in the speech request. Consent is required. See the voices reference for recording requirements and voice status.