A cloned voice can only be as good as the recording it learns from. The good news is that you need very little: about ten seconds of clean speech. This checklist covers how to record that reference so your Arabic clone sounds like the speaker, in the dialect and style you want.
Before you record: consent
Cloning someone's voice requires their permission, every time. On Hakim, every clone request must include consent_confirmed=true, which is your attestation that the speaker has agreed. Get that agreement in writing, and tell the speaker how the voice will be used. Our post on voice cloning consent explains why this matters and what a good consent flow looks like.
The recording checklist
Length. About ten seconds of continuous speech is enough. More is not better if it is noisier.
One speaker. Only the person you are cloning, with no other voices, even faint ones in the background.
The dialect and style you want to hear. The clone carries the dialect, register and energy of the reference into everything it says. If you want a warm Gulf customer-service voice, record the speaker talking that way, not reading formal news copy.
A quiet, soft room. Avoid echoey rooms with bare walls and hard floors. A small room with curtains, a sofa or clothes works well. Turn off fans and air conditioning if you can.
No music, no effects. No background music, no reverb, no heavy compression or noise suppression from a meeting app.
A steady, healthy level. Speak at a normal volume, about a hand's width from the microphone, and check that the recording never clips (the loudest parts should not hit the top of the meter). A very loud reference tends to produce a loud clone. We level loud references when they are registered, but a good recording is still the best start.
Natural speech. Speak the way the voice will be used, at a normal pace. A short, natural paragraph works better than a list of words.
A decent microphone. A modern phone held correctly in a quiet room is fine. A USB microphone is better. Avoid laptop microphones in open offices.
What Hakim does for you
When you upload a reference, Hakim cleans it first, reducing background noise and harsh "s" and "sh" sounds, and uses the transcript of the recording to learn the voice more accurately. That helps most with phone and room recordings, but it cannot rescue a recording with two people talking or music underneath. Record clean and let the cleanup handle the small things.
Creating the clone
curl https://api.tryhakim.ai/v1/audio/voices \
-H "Authorization: Bearer $HAKIM_API_KEY" \
-F "name=Branch support voice" \
-F "language=ar-SA" \
-F "voice_type=customer_service" \
-F "gender=female" \
-F "consent_confirmed=true" \
-F "file=@reference.wav"
languageis the language or Arabic dialect of the sample, for examplear-SAorar-EG.voice_typehelps you find the voice later: conversational, narrative, news, customer service, e-learning and others.- Accepted formats: wav, mp3, ogg, webm, m4a, mp4 and flac. Use wav or flac if you have them.
The voice starts as processing and is ready within seconds. Then pass its id as the voice on any POST /v1/audio/speech call.
Test before you ship
Generate a few lines from your real product: a greeting, a sentence with numbers, a name, a long paragraph. Play them to someone who knows the speaker. If something sounds off, the fix is almost always in the reference: re-record in a quieter room, closer to the microphone, in the style you want.
Need a voice that doesn't belong to anyone? Voice design creates a new voice from a written description instead of a recording.