{
 "use_case": "music-video-studio",
 "title": "Music video from your track: analysis, lyric timing and a cited treatment",
 "about": "A 50 s excerpt of a CC BY song and its lyrics. A request without the rights statement must be refused; with it, the analysis must find a steady beat near 112 BPM, place all 18 sung lines with the first and ninth line within half a second of the dataset's human timing, write a treatment whose scenes each cite lines and pass the checks, and plan a renderable edit, with every model call receipted. A text file sent as audio must be refused. No render: a render takes about 20 minutes of GPU; run it from the console or with POST /mvideo/runs/{id}/render when you are ready.",
 "licence": "inputs/bad-side-excerpt.ogg: \"Bad Side\" by Rxbyn (Jamendo), CC BY 4.0, excerpt 0:40-1:30, faded. inputs/bad-side-lyrics.txt: the song's lyrics as normalised in JamendoLyrics (annotations MIT). Your own track and lyrics replace these files.",
 "inputs": [
  {
   "file": "inputs/bad-side-excerpt.ogg",
   "what": "The track (Ogg Opus, 50 s). Swap in your own WAV, MP3, FLAC, OGG or M4A up to 20 MB."
  },
  {
   "file": "inputs/bad-side-lyrics.txt",
   "what": "The lyrics, one sung line per line. English; [Chorus] tags and LRC timestamps are fine."
  },
  {
   "file": "inputs/ATTRIBUTION.txt",
   "what": "Credit and licence for the sample."
  }
 ],
 "steps": [
  {
   "id": "norights",
   "method": "POST",
   "path": "/mvideo/analyze",
   "expect_status": 403,
   "body": {
    "audio_b64": {
     "$b64": "inputs/bad-side-excerpt.ogg"
    },
    "lyrics": {
     "$file": "inputs/bad-side-lyrics.txt"
    },
    "stream": false
   }
  },
  {
   "id": "notaudio",
   "method": "POST",
   "path": "/mvideo/analyze",
   "expect_status": 400,
   "body": {
    "audio_b64": {
     "$b64": "inputs/bad-side-lyrics.txt"
    },
    "rights": {
     "confirmed": true,
     "role": "artist"
    },
    "stream": false
   }
  },
  {
   "id": "analyze",
   "method": "POST",
   "path": "/mvideo/analyze",
   "timeout": 300,
   "body": {
    "audio_b64": {
     "$b64": "inputs/bad-side-excerpt.ogg"
    },
    "lyrics": {
     "$file": "inputs/bad-side-lyrics.txt"
    },
    "title": "Bad Side (excerpt)",
    "artist": "Rxbyn",
    "rights": {
     "confirmed": true,
     "role": "open-licence"
    },
    "stream": false
   }
  }
 ],
 "checks": [
  {
   "says": "a request without the rights statement is refused",
   "path": "norights.error",
   "contains": "rights"
  },
  {
   "says": "a text file sent as audio is refused",
   "path": "notaudio.error",
   "contains": "audio"
  },
  {
   "says": "a steady beat near 112 BPM",
   "path": "analyze.analysis.tempo_bpm",
   "min": 100,
   "max": 125
  },
  {
   "says": "all 18 sung lines are placed on the audio",
   "path": "analyze.lyrics.lines",
   "count": 18
  },
  {
   "says": "the first line starts within 0.5 s of the human timing (0.78 s)",
   "path": "analyze.lyrics.lines[0].start",
   "min": 0.28,
   "max": 1.28
  },
  {
   "says": "the ninth line starts within 0.5 s of the human timing (18.62 s)",
   "path": "analyze.lyrics.lines[8].start",
   "min": 18.12,
   "max": 19.12
  },
  {
   "says": "every scene cites lines and passes the code checks",
   "path": "analyze.scenes.verdict",
   "all_in": [
    "grounded",
    "weak",
    "instrumental"
   ]
  },
  {
   "says": "the edit plan cuts on the bar lines at least 10 times",
   "path": "analyze.plan.cuts",
   "min": 10
  },
  {
   "says": "the plan can be rendered",
   "path": "analyze.plan.render_allowed",
   "truthy": true
  },
  {
   "says": "every model call is receipted and signed",
   "receipts": "signed",
   "min": 3
  }
 ]
}