Skip to content
explainroo

Docs

Voices and languages

How to pick a voice or use your own recording, and how to make a video in German and other languages.

Which voice source should I use?

Kokoro reads your script on your computer. It costs nothing and needs no key. ElevenLabs gives you its premium voices and your cloned voices, paid on your ElevenLabs account. Cartesia has its Sonic voices, paid on your Cartesia account. A recording is your own voice reading the script. All of them work with word cues and captions.

Kokoro has no German voice. A German video needs a paid voice or a recording. explainroo services voice lists the choices with what they cost.

How do I choose a Kokoro voice?

npx --yes explainroo voices
npx --yes explainroo say "Hello there" --voice am_michael

The first lists the voices and their languages. The second saves a sample you can listen to. There are 28 English voices with American and British accents. English uses af_heart by default.

Set "voice": "am_michael" in video.json. The object { "provider": "kokoro", "id": "am_michael" } means the same thing. speed defaults to 0.9 for Kokoro. It changes only the voice, while pace changes the whole video.

How do I use ElevenLabs?

Get an API key from ElevenLabs. Then run this and paste the key when it asks:

npx --yes explainroo connect elevenlabs

connect tests the key and saves it in your settings folder, so every project can use it. Settings says where that is and where else explainroo looks for a key. Keep the key out of your scripts and logs.

List the voices available to your key:

npx --yes explainroo voices videos/dns --provider elevenlabs

Copy an id from the list into video.json:

"voice": {
  "provider": "elevenlabs",
  "id": "JBFqnCBsd6RMkjVDRZzb",
  "model": "eleven_multilingual_v2"
}

model is optional. It defaults to eleven_multilingual_v2. You can use premium or cloned voices already available to your key.

ElevenLabs receives your script text and charges your account. Check your plan’s costs and terms before you use it. voice reports the characters used. speed defaults to 1. ElevenLabs limits speed times pace to 0.7 through 1.2, and the voice command tells you when it uses that limit.

How do I use Cartesia?

Get an API key from Cartesia, then run npx --yes explainroo connect cartesia. List its voices for your video’s language and copy an id into video.json:

npx --yes explainroo voices --provider cartesia --language es
"voice": { "provider": "cartesia", "id": "<voice id>" }

model is optional and defaults to sonic-3.6. Cartesia reads everything between two pauses in one request, so the sentences sound connected. It receives your script text and charges your account per character. Cartesia limits speed times pace to 0.6 through 1.5.

When does a paid voice buy speech again?

explainroo buys paid speech one request at a time and saves each answer in the project’s history/voice/ folder. Editing a sentence buys only that sentence. Moving a marker, changing a pronunciation with {shown|spoken} or deleting build/ buys nothing.

If a run stops while a request is out, nobody can tell whether it was charged. Then voice stops and explains, and voice --new buys only those sentences again. voice --force makes every scene again, so with a paid voice it buys every sentence again. It says so first.

How do I use my own recording?

Read script.md aloud and put one take for the whole video in assets/. Set this in video.json:

"voice": { "provider": "recording", "src": "assets/narration.m4a" }

explainroo uses the script’s words to split the take into scenes. Each cut keeps about 0.15 seconds around the speech. Pauses inside a scene stay as recorded. The scene’s lead and hold add gaps between scenes.

For easier retakes, record one file per scene:

"voice": { "provider": "recording", "src": "assets/narration/" }

Each scene with narration needs a file named after its id, such as intro.wav or resolver.m4a. Supported formats are WAV, MP3, M4A, AAC, FLAC, OGG and Opus. Files must stay inside assets/, with no .. in the path. A recording works in every language explainroo has, German included.

Recordings become mono and their volume is brought close to Kokoro’s. Sample rates are kept up to 48 kHz. speed defaults to 1. Changing it or pace changes the tempo without changing the pitch.

How do I record well?

Use a quiet room and keep the microphone at the same distance. Make a short test and listen for room noise, loud breaths and distorted peaks. Read at a steady pace, with natural pauses. Avoid music in the recording, since explainroo adds the music later.

Read the spoken part of {shown|spoken}. Do not say markers or scene headings. If you change the words while recording, make the script match what you said. [pause], sentenceGap and paragraphGap do not add silence to a recording.

Replacing one scene’s file redoes that scene. Replacing a whole take redoes all its scenes.

Which languages can I use?

Set language in video.json. When voice is left out, Kokoro picks this default:

Language Setting Default voice
English en af_heart
Spanish es ef_dora
French fr ff_siwis
Italian it if_sara
Brazilian Portuguese pt-br pf_dora
Hindi hi hf_alpha
Japanese ja jf_alpha
Mandarin Chinese zh zf_xiaobei
German de none
npx --yes explainroo init videos/saludo --language es
npx --yes explainroo voices --language es

A Kokoro voice must match the video’s language. If you change the language of an existing project, change voice too, or remove it to use the default. The paid voices and recordings work in every language in the table. Other languages don’t work with any voice.

What do other languages need?

Spanish, French, Italian, Portuguese and Hindi need the espeak-ng program. Install it once:

sudo apt install espeak-ng     # Linux
brew install espeak-ng         # macOS

On Debian and Ubuntu you don’t need root for it. This sets up a copy of espeak-ng for explainroo alone, and it also downloads the speech check model Spanish needs:

npx --yes explainroo doctor --fetch --language es

It says what it does first. It downloads the packages from your computer’s own package sources and unpacks them into ~/.cache/explainroo/espeak-ng, without installing anything for the whole system. Then it writes a small script there that starts espeak-ng, and names that script as EXPLAINROO_ESPEAK in your settings file.

On other systems, install espeak-ng yourself. On Windows, use the installer from the espeak-ng releases page. If explainroo cannot find it, set EXPLAINROO_ESPEAK to its binary. You can put that line once in your settings file, and a value in the environment still wins. No other language needs espeak-ng, and neither do the paid voices or recordings.

Only making the voice and the speech check use espeak-ng. So the commands that only draw frames, like still, never need it. Before the project exists, this checks what a language needs:

npx --yes explainroo doctor --language es

--language es,fr checks two languages at once, and doctor videos/<name> checks what a project needs.

Japanese and Chinese need Python 3 with misaki instead. See Japanese and Chinese.

The first speech check in another language downloads multilingual Whisper small, 252 MB. doctor --fetch --language es downloads it ahead, with everything else Spanish needs. It downloads the English speech check model only when English is among the languages. Hindi fonts come with the looks.

Write the script as someone would speak that language. Cues work the same, so at: "qué" matches “Qué”. A cue also finds a word after an elided article, so at: "ombre" finds “l’ombre”. Captions and subtitle files keep the written text. Use {shown|spoken} for a pronunciation change in the same language. The speech check matches spelled numbers to digits in most languages, as the next section explains.

The speech check reads units and symbols as the words of the language. So “300 000 km/s” in what Whisper heard matches “trescientos mil kilómetros por segundo” in the script. Numbers count by their value, with the thousands written the way the language writes them. In the languages that use espeak-ng, a word heard as another word with the same sound also counts, like “haya” for “halla”.

The Hindi speech check confirms fewer words. Listen before changing a word. Fix it when it sounds wrong or stays unconfirmed in several scenes.

How does the speech check read numbers and amounts?

The speech check accepts digits for numbers. In English and German it also reads spelled numbers as digits. Since explainroo 0.6, it does that in these languages too:

  • Spanish
  • French
  • Italian
  • Brazilian Portuguese

So “cinco” heard for 5, or “treinta y cinco” for 35, is confirmed. In these four languages it reads whole numbers from 0 to 9,999 and simple decimals, like “tres coma cinco”. Percentages count too.

It doesn’t read spelled numbers in the other languages, or larger numbers. When a digit is heard as a word there, voice names the override with that word, like {5|cinco}.

An amount of money reads as the number and the word for the currency. So “cem reais” in what Whisper heard matches R$100 and R$ 100,00 in the script, and R$ 22 matches “vinte e dois reais”. The symbol may stand before or after the number:

Symbol Reads as
R$ reais, or reales in Spanish and Real in German
US$ and $ dollars
€ euros
£ pounds, in the word of each language

Hindi reads these amounts too, with digits in the script, like “100 डॉलर”.

Maths works the same way. Whisper writes “two x squared plus three x minus five equals zero” as “2x² + 3x-5 = 0”. The check reads symbols like ² and = as the words of the language, and a fraction like 5/2 as “five halves” or “five over two”.

A word with an apostrophe, like “un’ape” or “l’eau”, counts when its letters are heard with a space or joined, like “un ape”. This works in every language.

When a name is said right but always heard as another spelling, a "heard" line in video.json accepts that form. See the speech check.

How do Japanese and Chinese work?

Kokoro’s Japanese and Mandarin voices were trained with misaki, a pronunciation library for Python. explainroo runs it through your Python 3. Install what the language needs:

python3 -m pip install "misaki[ja]"   # Japanese
python3 -m unidic download            # Japanese dictionary, about 526 MB
python3 -m pip install "misaki[zh]"   # Chinese

On Windows, write python instead of python3. If misaki is in a virtual environment, set EXPLAINROO_PYTHON to that environment’s Python. doctor shows whether it is found.

Write the script as usual, without spaces between words. explainroo finds the words itself, so at: "解析" and [#markers] work. A cue can be a phrase, but it must match whole words. Put a marker where you need a moment inside a word.

Latin words such as API or JavaScript are read in English. For a Japanese reading, write it out, as in {API|エーピーアイ}. Numbers can stay in digits, decimals included. The Japanese reader sometimes picks the wrong reading, such as ついたち for 一日. Write 1日 there, or give the reading with {shown|spoken}.

Whisper often writes a word with other characters that sound the same, so the speech check compares sounds. Japanese is compared by its kana reading, and Chinese by pinyin without tones, with Traditional and Simplified characters counted as the same. Captions and subtitles join words without spaces, with up to 18 characters per subtitle line.

The looks’ fonts have no Japanese or Chinese characters. The first run downloads Noto Sans JP or Noto Sans SC, about 33 MB, and keeps it in the cache. After that, everything works offline. A web player keeps only the characters the video shows, so it stays small.

How do I make a German video?

Kokoro has no German voice, so a German video speaks with a paid voice or your own recording. The paid voices are ElevenLabs and Cartesia. Set language and one of these voices in video.json:

"language": "de",
"voice": { "provider": "recording", "src": "assets/narration.m4a" }
"language": "de",
"voice": { "provider": "cartesia", "id": "<voice id>" }

explainroo voices --provider cartesia --language de lists Cartesia’s German voices. For ElevenLabs, use { "provider": "elevenlabs", "id": "<voice id>" }. Its default model eleven_multilingual_v2 reads German with each of your voices.

init can only set up a Kokoro voice, so init --language de stops and creates nothing. Create the project without --language, then set language and voice. German needs neither espeak-ng nor misaki. The word timing and the speech check use the multilingual Whisper model, and doctor --language de says whether you have it.

The speech check reads German the way a voice says it. Numbers written as one word, like “zweiundvierzig”, count as the number, and so do years like “neunzehnhundertneunzig”. It knows ordinals like “3.” and short forms like “z. B.” and “Mio.”. Another short form shows as a word the check could not confirm. Write it with {shown|spoken} then, like {Abb.|Abbildung}.

A period inside a sentence doesn’t end it after an ordinal like “am 3. Mai”, or in short forms like “z. B.”. Every other period ends the sentence. Where that rule gets it wrong, write {3.|dritten} or add a [pause]. German has no phonemizer in explainroo, so a word heard as another word with the same sound stays unconfirmed. Reword the sentence then.

The German leap years example is made from a recording.

Can one video come in several languages?

Yes. script.md holds the main language, the one in language. Each script.<lang>.md adds one more, like script.es.md. One scenes.js draws them all. Word cues differ between languages, so give each script the same [#markers] and cue the pictures on those.

Put the text on screen in strings.json, and its translations in strings.es.json and so on. A scene reads it with s.str("key"). "languages": { "es": { ... } } in video.json holds settings for one language, like its voice. A language without a voice of its own uses its default, and German always needs one there.

Add --lang es to the commands from voice to publish. The Spanish version builds in build/es/ and writes to out/es/. package reads post.es.json when there is one.

How do I check the narration?

With any voice source, run the usual commands:

npx --yes explainroo voice videos/dns
npx --yes explainroo check videos/dns
npx --yes explainroo render videos/dns
npx --yes explainroo verify videos/dns

For a recording mismatch, make the script match the recording. For a generated voice, use a pronunciation change or reword the sentence. See writing the script and checking a video.