DEV Community

Abdelhak
Abdelhak

Posted on AI-assisted

Building Algerian Darija TTS: LoRA, Code-Switching, and Natiq-dz-ARG

Disclosure: I'm sharing this project from Natiq Studio, the team developing Natiq-dz-ARG.

Text-to-speech models can produce impressive English, French, and Modern Standard Arabic. Algerian Darija introduces a different challenge: the same sentence can move between Arabic and French while retaining a distinctly Algerian rhythm.

At Natiq Studio, we've been working on that problem with Natiq-dz-ARG, an open-weight speech model adapted specifically for Algerian Darija. This article covers the main engineering lessons behind it and where developers can experiment with the release.

Why code-switching matters

Consider this everyday sentence:

سلام خويا، حبيت نسقسيك على la livraison تاع هاد produit.

An Arabic model may mishandle the French words; a French model may struggle with the surrounding Darija. A useful system needs to preserve pronunciation across the transition while keeping the voice and pacing consistent.

Darija also has its own vocabulary and pronunciation, shaped by Arabic, French, and Amazigh influences. Treating it as Standard Arabic with a different word list misses much of what makes it sound natural.

What we released

Natiq-dz-ARG is a LoRA adapter for the bosonai/higgs-tts-3-4b foundation model. Its main characteristics are:

  • Fine-tuning on more than 300 hours of Algerian speech.
  • Recordings from more than 100 speakers.
  • French code-switching within Algerian Arabic sentences.
  • Zero-shot voice conditioning from a short reference recording.
  • 24 kHz audio generation.

The aim is speech that reflects how Algerians actually communicate. These characteristics describe the release; they are not a claim that every regional accent or mixed-language sentence is handled perfectly.

Lesson 1: separate dialect learning from speaker memorization

Our earlier single-speaker experiments overfit. The output reproduced characteristics of the training voice instead of generalizing reliably to new speakers and unfamiliar sentences.

We moved to a larger, more diverse corpus. Recordings from many speakers gave the model broader exposure to Algerian pronunciation and speaking styles.

The practical lesson was that clean recordings alone were not enough. Speaker diversity mattered because we wanted the system to learn dialect patterns without tying those patterns to one person's voice.

Lesson 2: transcript spelling affects mixed-language speech

Transcript quality was another major challenge. French expressions in Algerian conversations are sometimes written phonetically in Arabic script. For example, physicien may appear as فيزيسيان.

During preparation, we cleaned mixed-language transcripts and preserved French spelling where appropriate. That helped align the written input with the pronunciation we wanted the model to learn.

This is an easy detail to underestimate in a speech pipeline: text normalization can change the language cues available to the model.

Lesson 3: adapt a foundation model with LoRA

Rather than train a large speech model from scratch, we used Low-Rank Adaptation (LoRA) to adapt Higgs TTS 3.4B.

LoRA trains a smaller set of additional parameters instead of updating every weight in the original model. That makes adaptation more computationally manageable while retaining useful knowledge from the base model.

The downloadable release is an adapter. Developers should follow the repository's architecture and inference instructions rather than assume the adapter is a standalone speech engine.

Trying zero-shot voice conditioning

Inference uses three inputs:

  1. A short reference recording from a speaker.
  2. An accurate transcript of that recording.
  3. New Algerian Darija text to synthesize.

The generated speech is conditioned on the reference voice. Use reference audio only when you have the necessary rights and consent.

Start with the model weights and inference documentation, or explore the interactive Hugging Face demo.

The published local inference instructions recommend a compatible CUDA GPU with at least 16 GB of VRAM. Check the repository for the current setup steps and reference examples.

Open weights and licensing

The adapter is released under CC BY-NC 4.0 for non-commercial use under its terms. Commercial use requires appropriate licensing. The underlying Boson AI foundation model also has its own applicable license.

For that reason, we describe this as an open-weight release rather than imply unrestricted commercial use. Access to model weights and access to the training dataset are separate matters.

A hosted option for application developers

Alongside the research model, Natiq Studio offers hosted Algerian Darija speech generation for creators and developers who prefer not to manage GPU inference.

The hosted platform is a separate service from the downloadable adapter. It offers selectable voices, downloadable WAV audio, and a REST API; it does not currently offer user-uploaded voice cloning.

For example:

curl -X POST https://natiq.studio/api/v1/speech \
  -H "Authorization: Bearer $NATIQ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "سلام عليكم خاوتي، واش راكم اليوم؟",
    "voice": "leila"
  }'
Enter fullscreen mode Exit fullscreen mode

Retrieve current voice IDs through GET /voices. Speech creation returns a job ID and status URL; poll until generation succeeds or fails. Keep the API key on your server.

See the Natiq Studio API reference for the current request format, limits, and job-handling details. New accounts receive 100 starter tokens after email confirmation.

What still needs work

Algerian Darija remains underrepresented in speech AI. There is room to improve regional accent coverage, pronunciation consistency, and mixed-language text handling.

We hope the release helps other developers investigate those problems and share useful feedback.

For more detail, read our training approach and project background on Natiq Studio.

Have you worked on speech synthesis for an underrepresented dialect? What caused the most trouble: data coverage, transcript quality, or evaluation?

Top comments (0)