Playground
Add diacritics
Mark Arabic text with tashkeel before you generate with an Arabic voice, keep the marks you typed yourself, and know when the switch helps.
Diacritics (tashkeel) fix how an Arabic word is pronounced. When you finish this page you will have marked a passage with one click, kept the marks you typed by hand, and generated speech from the marked text. Use it whenever an Arabic reading has to get names, endings and ambiguous words right.
What you need
- An Arabic voice selected on the Text to Speech page. The Tashkeel switch appears for every voice that is not an English voice.
- Arabic text in the writing area. See Generate speech for the page itself.
Steps
Step 1: Select an Arabic voice
Click the chip of an Arabic dialect, such as Fusha, and click a voice, or use All voices. The Tashkeel switch appears in the Tags row above the dialect chips. With an English voice the switch is not shown.
Step 2: Mark the words you want to control yourself
Type diacritics on any word whose pronunciation you want to fix: a proper name, a word with two readings, a poetic ending. A word that carries at least one mark when you turn the switch on is kept exactly as you typed it, marks and all. The marks that count are the short vowels (fatha, damma, kasra), the three tanween, shadda, sukun and the dagger alif.
A word is anything between spaces or line breaks. Mark one letter and the whole word is yours; the rest of that word gets no further marks.
Step 3: Turn on Tashkeel
Click the Tashkeel switch. It stays off, and cannot be clicked, until the writing area holds Arabic letters. While the marks are being added the switch cannot be pressed again.
Leave the text alone until the marks arrive. If you edit the text while the marks are being added, the marked version is discarded and the writing area keeps what you typed.
Step 4: Review the marked text
The writing area now holds the marked text. Every word that had no mark carries marks; every word you marked is unchanged; spaces and line breaks are where you left them. The counter has gone up, because each diacritic is one character.
To go back, click the switch again. It removes every mark from the text, including the ones you typed yourself. Turn it on again for the same text and the marks come back without a second call.
Step 5: Generate
Click Generate. The marked text is what is spoken and what is charged. It is also the text kept with the generation in History.
Get it right
Marking is free, so use it on every Arabic passage where pronunciation matters, and mark by hand only what the automatic marking is likely to get wrong.
Recommended
- Type diacritics on the proper names and the words with two readings, then turn on Tashkeel once for everything else, then generate.
Less effective
- Turn on Tashkeel first, then read through the fully marked passage to find and repair the names by hand.
Worked example
You are generating a school sentence with an Arabic voice and you want the word for "the boy" read with the nominative ending.
Type the sentence and mark that one word yourself:
ذهب الوَلَدُ إلى المدرسةThe counter reads
24 / 5,000 characters: 18 letters, 3 spaces, and the 3 marks you typed are counted too.Click Tashkeel. The switch pulses for a moment.
Read the result. The three words you did not mark now carry diacritics.
الوَلَدُis exactly as you typed it. The counter is higher than 24 by the number of marks that were added.Click Generate. The charge counts every character, spaces included, so the marks you added are part of it.
What happens next
- The marked text replaces the unmarked text in the writing area and is what the next generation speaks.
- The History item for that generation keeps the marked text.
- Nothing is charged for the marking itself.
Limits
| Limit | Value | Applies to |
|---|---|---|
| Text sent for marking | 1 to 5,000 characters | Each click |
| Voices | Arabic voices only; the switch is hidden for English voices | The Tashkeel switch |
| Cost | No credits | Each click |
| Marked text | Can exceed 5,000 characters after marking; a generation over the limit is rejected | The next generation |
Troubleshooting
The Tashkeel switch is not there
The selected voice is an English voice. Pick an Arabic voice.
The switch is greyed out
The writing area holds no Arabic letters, or the marks are still being added. Type some Arabic text or wait for the marks to arrive.
Nothing changed after I turned it on
One of three things happened: every word already carried a mark, so every word was yours and was kept; the speech service had no word to mark; or you edited the text while the marks were being added, so the marked version was discarded. When there was nothing to mark, a message reads No words here need diacritics, so the text stays as written. Turn the switch on again once you have stopped typing.
My own marks were replaced
The marked text came back with a different number of words than you sent, so the words could not be matched to yours and the marked text was used whole. Type your marks again on the marked text.
Could not add the marks. Please try again.
The marks could not be added. Your text is unchanged. Wait a short while and turn Tashkeel on again.
Error: text must be shorter than or equal to 5000 characters
This appears when you generate, not when you mark. The marks pushed the text past 5,000 characters. Shorten the passage and generate again.
FAQ
Does adding diacritics cost credits?
No. The marking is free. The generation that follows is charged on the marked text, and every mark counts as one character.
Can I undo it?
Yes. Click the Tashkeel switch again. It removes every mark, including the ones you typed yourself, so copy any text you want to keep as marked.
Does it work with dialect voices?
Yes. The switch is shown for every Arabic voice, including dialect voices. The marks are added for the dialect of the selected voice.
Which of my marks are kept?
Any word carrying a short vowel, tanween, shadda, sukun or dagger alif when you turn the switch on is kept exactly as typed.
Can I do this from the API?
Yes. Send tashkeel: true on the synchronous generation call with a Fusha
voice. The details are on
Text to Speech voices and options.
Related
- Generate speech: the page the switch lives on
- Voice settings: the other controls in the Options panel
- Limits and credits: why marked text costs more than unmarked text
- Text to Speech voices and options:
the
tashkeeloption over the API