Skip to content

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 and Arabizi conversion.

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

    The browser opens for you to sign in; the key is saved for every command. --no-browser pastes a key from the dashboard instead. In CI, set TAPRA_API_KEY.

    npx @tapra/sdk authtapra auth status   # key, where it comes from, balance
  2. 2

    Transcribe a file

    Derja mixed with French and English comes back as spoken. In a terminal you see the estimated cost and your balance first, and confirm. Speakers are labelled by default (--no-diarize to skip); 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. Eleven voices; --flash is faster and cheaper. --style ad (or ad_calm, narration, explainer, reel) sets pauses, pace and loudness; --numbers french reads phone numbers, prices and percentages in French; --captions srt writes free timed captions next to the audio.

    tapra speak "عسلامة، حبيت نتلقاو demain" --voice zeineb -o hello.wavtapra speak --file script.txt --voice karim --flash -o narration.wavtapra speak --file ad.txt --style ad --captions srt -o ad.mp3          # MP3 + ad.srttapra speak "كلمنا على 74 250 310" --numbers french --duration 6 -o call.wav
  4. 4

    Convert Arabizi

    Flip Arabizi to Arabic script and back, direction detected.

    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 transcribeAny audio or video file to text, srt or vtt, with speaker labels (--no-diarize to skip). Long files are split automatically.paid
tapra streamLive transcription from your microphone, a file or stdin, with a running cost.paid
tapra diarizeWho spoke when, without a transcript.paid
tapra speakTunisian voiceover from text, saved as WAV, MP3 or FLAC. --style, --numbers, --captions; --flash for speed.paid
tapra flipArabizi to Arabic script and back, direction detected.paid
tapra auth loginSign in through the browser, or save an API key after checking it.
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 Tapra-Speak voices, read live from the API.
tapra healthAPI status.
tapra config showPrint saved settings.
tapra config setSave api_url, site_url, voice, output, confirm or diarize (on/off).
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.
-y, --yesDo not ask before paid commands. Scripts and agents are never asked.
--max-cost <tnd>Refuse anything estimated above this; stream stops when it gets there.
--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.
TAPRA_CONFIRMSet to off to stop asking before paid commands.
TAPRA_RTLlogical keeps Arabic as stored; visual forces right-to-left layout.
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