{
 "use_case": "translate",
 "title": "Live translation: 28 seconds of a synthetic Spanish repair call, streamed from a file",
 "about": "Two cuts from a synthetic Spanish phone call booking a plumber (a leak under the kitchen sink; a technician on Thursday between 8 and 10; the visit costs 45 dollars; the address), streamed over the live WebSocket with lang=es and target=en. Every Spanish sentence must come back translated into English as it is said, and the call must end with an English summary that keeps the day, the price and the address.",
 "licence": "Synthetic: a script written for Decosa (no real people or companies) read by Decosa house voices (Kokoro-82M stock voicepacks, Apache-2.0), each allowed by the consent ledger for project decosa-translate-demo. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/repair-call-es-28s.wav",
   "what": "16 kHz mono 16-bit WAV, up to 30 s for a rehearsal (two cuts joined by half a second of silence). Your own recordings must be in the same format (ffmpeg -i in.m4a -ac 1 -ar 16000 -sample_fmt s16 out.wav); set lang and target in the query to your language pair."
  },
  {
   "file": "inputs/repair-call-es-script.json",
   "what": "The Spanish script the clip was cut from (only the turns in the clip, with the cut times), to compare the captions against by eye."
  }
 ],
 "steps": [
  {
   "id": "session",
   "live": {
    "vertical": "translate",
    "audio": "inputs/repair-call-es-28s.wav",
    "speed": 2,
    "query": "&lang=es&target=en"
   },
   "timeout": 150
  }
 ],
 "checks": [
  {
   "says": "the session ends with a done event",
   "path": "session.done",
   "exists": true
  },
  {
   "says": "the session reports no errors",
   "path": "session.errors",
   "count": 0
  },
  {
   "says": "the Spanish captions carry the sink and Thursday",
   "path": "session.captions.text",
   "contains": [
    "fregadero",
    "jueves"
   ]
  },
  {
   "says": "translations arrive in English (target en)",
   "path": "session.lanes.translation.data.target",
   "equals": "en"
  },
  {
   "says": "at least 4 sentences are translated",
   "path": "session.done.summary.translation",
   "count_min": 4
  },
  {
   "says": "the translations carry the leak and Thursday",
   "path": "session.done.summary.translation.translation",
   "contains": [
    "leak",
    "Thursday"
   ]
  },
  {
   "says": "the English summary keeps the day, the 45-dollar price and the street (Olmo)",
   "path": "session.done.summary.summary.summary",
   "contains": [
    "Thursday",
    "45",
    "Olmo"
   ]
  },
  {
   "says": "every speech and model call has a signed receipt",
   "receipts": "signed"
  }
 ]
}
