Install
From a computer to your first screen, step by step.
How it works
- Turjuman runs on one computer. OBS and browsers open its pages.
- A screen's link, open in OBS or a browser, listens to the microphone input of the computer it is open on. That computer needs the mosque's audio; a smart TV's own browser can't be used.
- Simplest: Turjuman and OBS on one computer, with the audio. A page on another computer needs HTTPS: Phone & network.
- Every open caption page is its own Soniox stream: two computers showing captions cost twice.
What you need
| A computer | macOS, Linux or Windows. It must be on during the khutbah. The computer that runs OBS works fine. |
|---|---|
| Node.js 24 or newer, and git | From nodejs.org. Run corepack enable once for pnpm (if corepack is not found: npm install -g corepack). About 250 MB on disk. With Docker instead: Docker. |
| A Soniox account with credit | At console.soniox.com. Soniox hears the Arabic and translates it. |
| Internet | Outbound HTTPS to Soniox; no port needs opening. About 256 kbit/s upload per caption page while someone speaks. |
| The mosque's audio | On the computer that shows the captions, for example from a USB audio interface on the mixer's aux output. |
ffmpeg is only needed for server-side capture. On Windows, run the commands in Git Bash (part of Git for Windows): Windows PowerShell 5.1 doesn't accept &&, and the HTTPS and backup steps are bash scripts.
Install
git clone https://github.com/ cd turjumanpnpm install && pnpm buildturjuman-translator/ cli.git turjuman
If pnpm is not found, run corepack enable first. On its first start Turjuman downloads, in the background, the Quran text from Tanzil, for verified verse references, and the translations listed under quran.translations (by default only the Dutch nl.siregar). Without internet it tries again later; until the files are there, Turjuman works but verses get no reference. pnpm exec tsx scripts/ downloads them again by hand.
Turjuman keeps everything in this folder. Its first start makes config.yaml here, with only the settings of this install; to change another setting, add it there and restart. config.example.yaml explains every setting.
A Quran translation for another language: add a line under quran.translations in config.yaml with the file name of its Tanzil id, and restart: Turjuman downloads it. For English:
quran: translations: nl: quran/nl.siregar.txt en: quran/en.sahih.txt
Tanzil's translations are for non-commercial use only.
Add your Soniox key
pnpm turjuman setupOptional: you can also add the key later in the app (below). Setup asks for your Soniox key, checks it with Soniox (a free call) and saves it in .env in this folder, readable only by you. Then it offers to create the first admin account: the username and password you log in with.
- To change the key, run
setupagain; Enter keeps the current key and checks it again. pnpm turjuman setup --checkasks Soniox whether it accepts the saved key. It checks the key, not your credit.- A key from an EU-region Soniox project (
stt.soniox.region: eu): check it withpnpm turjuman doctor --online.
No Soniox key yet? Press Ctrl-C: nothing is saved. Then start Turjuman, create your account at http://127.0.0.1:8765/login on this computer, and add the key later in the app under Keys, where it is stored encrypted.
Start Turjuman
pnpm turjuman startIt prints its addresses and where to open the app:
12:00:00 info Server listening at http://127.0.0.1:8765 Turjuman server running (v0.1.0, exposure local) Caption link: http://127.0.0.1:8765/ Caption page: http://127.0.0.1:8765/ Overlay / dock: http://ar/ nl 127.0.0.1:8765/ Health: http://overlay http:// 127.0.0.1:8765/ control 127.0.0.1:8765/ Open the app: Screens (dashboard): http://health 127.0.0.1:8765/ New screen (builder): http://app 127.0.0.1:8765/ Caption look: http://app/ new 127.0.0.1:8765/ app/ look
Then a log line follows for each request, such as 12:00:05 info GET /app 200 4 ms; the log goes to this terminal only. The lines of a first start (the config.yaml it made, the Quran data it downloads, no Soniox key yet) don't stop the server.
Keep this terminal open: Turjuman runs while it is open, and Ctrl-C stops it. For the next commands, open a second terminal in the same folder. pnpm turjuman open opens the app in your browser.
Port 8765 taken? start stops with Port 8765 is in use. Set another under server: in config.yaml, for example port: 8766.
Check
pnpm turjuman doctorIt checks the setup and says what is wrong. Each line says [ok], [warn] or [FAIL]. Fix every [FAIL]; a [warn] can be fine, for example when ffmpeg is not installed.
It only checks that your key is set. pnpm turjuman doctor --online also asks Soniox whether it accepts it. Nothing is billed.
Make your first screen
A screen is the captions for one place, for example “Main hall”. It has one link, the screen link, and you show that link on a TV.
In the browser: open New screen (/app/new):
Choose the languages.
Choose the layout and the look.
Pick the microphone and test it.
Save.
The screen appears on your dashboard. A new screen starts off: switch it on there before the khutbah.
Or in the terminal:
pnpm turjuman screens add --name "Main hall" --from ar --to nl --enablepnpm turjuman screens list
A screen made in the terminal uses the default microphone of the computer that shows it. A microphone picked in the app is saved by its name: on another computer the page takes the first input whose name contains it, else the default input.
Show it on a screen
Every screen has a screen link, like http://127.0.0.1:8765/feed/1f0c…. Copy it from the dashboard, or print it:
pnpm turjuman screens url "Main hall"Treat it like a password: whoever has it, and can reach this server, can run captions on your Soniox credit. Then put it in OBS Studio or a browser: Show on a screen.
Update
git pullpnpm install && pnpm build
Do it outside a khutbah, then start Turjuman again. Your settings, key, accounts, screens and transcripts stay: git ignores them. git clean -fdx would delete them.
To change languages.yaml or a glossary, edit a copy and point languagesFile or glossariesDir in config.yaml to it: an edited tracked file makes git pull stop on a conflict. pnpm turjuman --version shows the version.
To run it always, also after a restart: Docker.
Back up
Copy what Turjuman keeps in this folder: config.yaml, users.yaml, screens.yaml, presets.yaml, orgs.yaml, secret.key, tls/ and transcripts/. Keep .env (your Soniox key, in plain text) and master.key apart, in a safe place: with orgs.yaml, master.key unlocks the key stored in the app.
tls/ca.key can sign certificates your devices trust: keep backups private. The command, and how to restore: “Back up” in the README. With Docker: make backup (Docker).
When something does not work
| “Microphone needs HTTPS” | Open the page on the computer that runs Turjuman (127.0.0.1), or set up HTTPS: Phone & network. |
|---|---|
| “Port 8765 is in use” | Turjuman may be running already: pnpm turjuman status. Or set another port (step 5). |
| The dot in the screen's corner stays orange | Switch it on in the dashboard. |
| “Not accepted” for a key | Copy the key again from console.soniox.com, and run pnpm turjuman setup. |
Captions stop; the log says Soniox fatal error; not retrying | The reason follows: 401, the key is refused; 402 or balance_exhausted, no credit. Fix it at console.soniox.com, then switch the screen off and on. |
Host not allowed | With exposure: local, open Turjuman at 127.0.0.1 or localhost, or set exposure: lan: Phone & network. |
| Anything else | pnpm turjuman doctor checks the setup and says what is wrong; the log is in the terminal. |
More in the guide.
Uninstall
Stop Turjuman and delete this folder: everything Turjuman keeps is in it, so back up first what you want to keep. With Docker, first make down and docker image rm turjuman:local turjuman:build (“Uninstall” in the README). On every device that installed the CA, remove “Turjuman local CA”.