Measure loudness
measure_loudnessMEASURE THE MIX — you cannot hear it; this is how you check it. Mixes the timeline's audio offline exactly as an export does (every audio track, nested timelines, fades, volume keyframes, clip audio effects, ducking, mute/solo) and measures it with EBU R128 / ITU-R BS.1770 — the same meter export loudness normalization uses. The mix is measured AS MIXED: an export's loudnessTargetLufs would then shift all of it by one gain.
Returns {jobId}; poll get_job_status every few seconds. When done, result is {durationSec, integratedLufs, truePeakDbtp (4× oversampled, BS.1770-4), samplePeakDbfs, loudnessRangeLu, maxShortTermLufs, windows: [{fromSec, toSec, integratedLufs, maxShortTermLufs}] one per windowSec, sections?: [...same per requested section], speech: {source: transcript|none, speechSec, gapSec, mixDuringSpeechLufs, mixInGapsLufs, transcribedClips, untranscribedClips}, tracks: [{trackId, name, carriesSpeech, integratedLufs, samplePeakDbfs, duringSpeechLufs, inGapsLufs}]} (true peak is measured on the whole mix). SPEECH comes from transcript word timings mapped onto the timeline (trims, nests, speed): a GAP is a stretch of at least 0.6 s with no word within 0.25 s of it. inGapsLufs of a music/ambience track is the bed's level where nobody talks; compare it with the speech track's duringSpeechLufs. Without a transcript (speech.source 'none') the speech/gap fields are null — run start_transcription on the dialogue first. Integrated values are gated (−70 LUFS absolute, −10 LU relative), so silence does not drag them down; null means too short (under 0.4 s) or silent. Needs the project open in the editor tab you are paired with (PROJECT_NOT_OPEN otherwise).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | The session token `connect` returned. Pass it on every call — it says which browser to drive. | |
| sections | No | Optional named spans to report on their own — e.g. the intro, each interview answer. Timeline seconds. | |
| projectId | Yes | Project id from get_projects. | |
| windowSec | No | Length of each entry in `windows` (3–600 s, default 10). | |
| timelineId | Yes | Timeline to measure (what an export of it would sound like). |