Tapra CLI

Derja transcription and voiceovers from your terminal

One command for scripts, CI and AI agents: transcripts and subtitles of Derja mixed with French, Arabic and English, live transcription, natural Tunisian voiceovers, Arabizi and translation.

Install the tapra command

Same commands from npm and pip. Needs Node.js 22+ or Python 3.10+.

npm install -g @tapra/sdk
Get an API key

Quick start

Up and running in five steps

Each step is one or two commands. Paid commands print what they cost and the balance left.

  1. 1

    Log in

    Paste an API key from the dashboard. It is checked against your account, then saved for every command. In CI, set TAPRA_API_KEY instead.

    tapra auth logintapra auth status   # key, where it comes from, balance
  2. 2

    Transcribe a file

    Derja mixed with French and English comes back as spoken. Add --diarize for speakers, and pick text, json, srt or vtt.

    tapra transcribe call.mp3tapra transcribe pitch.wav --prompt "Tapra, Ooredoo, Sfax"
  3. 3

    Make a voiceover

    Arabic script, Arabizi, French or English, in one line, with Tunisian pronunciation. Five voices; --flash is faster and cheaper.

    tapra speak "عسلامة، حبيت نتلقاو demain" --voice amal -o hello.wavtapra speak --file script.txt --voice fahmi --flash -o narration.wav
  4. 4

    Convert and translate text

    Flip Arabizi to Arabic script and back, direction detected. Translate between Derja and English, French or Arabic.

    tapra flip "3lech 7abit l9anoun?"      # علاش حبيت القانون؟cat comments.txt | tapra flip - --to arabic
  5. 5

    Script it, or hand it to an agent

    Results go to stdout and cost to stderr. --json gives parseable output, --dry-run shows the request without sending it, and exit codes say what went wrong.

    tapra transcribe call.mp3 --json | jq -r '.segments[].text'for f in calls/*.mp3; do tapra transcribe "$f" -o "${f%.mp3}.txt" -q; done
    For Claude Code, Codex or Cursor.

Reference

Commands, options and exit codes

Run tapra <command> --help for every option of a command.

Commands
CommandWhat it does
tapra transcribeAudio or video to text, srt or vtt. Speakers with --diarize.paid
tapra streamLive transcription over WebSocket, from a file or stdin.paid
tapra diarizeWho spoke when, without a transcript.paid
tapra speakTunisian voiceover from text, saved as WAV. --flash for speed.paid
tapra flipArabizi to Arabic script and back, direction detected.paid
tapra translateDerja to and from English, French and Arabic.paid
tapra auth loginSave an API key after checking it against your account.
tapra auth statusWhich key is used, where it comes from, and your balance.
tapra auth logoutRemove the saved key.
tapra balanceYour balance in TND.
tapra pricingPrice per model.
tapra modelsModel IDs for the API.
tapra voicesThe five Tapra voices.
tapra languagesTranslation languages.
tapra healthAPI status.
tapra config showPrint saved settings.
tapra config setSave api_url, site_url, voice or output.
tapra config unsetRemove a setting.
tapra config pathWhere settings are saved.
tapra completionShell completion for bash, zsh, fish or PowerShell.
Global options
OptionWhat it does
--jsonPrint the full JSON response.
-q, --quietNo cost or progress lines on stderr.
--dry-runPrint the HTTP request, key hidden, and send nothing.
--api-key <key>Key for this run only.
--api-url <url>Model API address. Default https://api.tapra.tn.
--timeout <seconds>Request timeout. Default 300.
-o, --output <file>Write the result to a file. Never overwrites without --force.
Environment variables
VariableWhat it does
TAPRA_API_KEYAPI key. Wins over the saved key; --api-key wins over both.
TAPRA_API_URLModel API address.
TAPRA_OUTPUTSet to json to make --json the default.
TAPRA_CONFIG_DIRWhere config.json lives.
Exit codes
CodeMeaning
0Done.
1API or network error.
2Bad command, option or file.
3No API key, or the key was refused.
4Balance too low. Top up in the dashboard.

Questions

Script Tunisian speech in minutes