跳转到内容
EN

分析项目素材

POST /cut/v1/projects/{project_id}/analysis

Request silence, filler-word, scene or beat analysis for selected bound assets before editing, or measure the mix the timeline itself renders with kind mix. That kind is a render job, not a read: it answers pending with retry_after_sec and an id. Poll by calling this same method again with body { kinds: [“mix”], id } (there is no separate retrieve method); that call reads the measurement and renders nothing. The answer only exists once the audio has been rendered and measured. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. The asset kinds are polled the same way: call this method again with the same kinds and media, and each call answers the current state; inside a script, GetAnalysis reads the latest result without a call. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed. kind mix is separate: it reports the project mix loudness, the loudness of each role and where music masks speech, so an editor can fix the mix rather than guess at it.

支持状态: supported

参数

名称位置类型必填说明
project_idpathstringtrueProject identifier returned by its create or list operation; use the id, not a display name.

请求体 (application/json)

必填: true

名称类型说明
mediaarray<object>Bound-library assets to analyze; omission selects project media.
media[].library_idstringIdentifier of a library present in the project bindings.
media[].asset_idstringAsset identifier returned by media import or praxis.media asset operations.
kindsarray<string>Analysis types to request. silence, filler, scenes and beats analyze the selected source assets and are read from the media library; mix measures the project’s own rendered mix and is requested on its own.
fromnumberRange start for kind mix, in seconds on the project clock. Omitted with to, the whole timeline is measured, capped at 120 seconds. Ignored by the asset kinds.
tonumberRange end for kind mix, in seconds on the project clock, exclusive. An end up to 0.05 s past the timeline’s end (a rounded duration) is read as the end; further past is refused. A range longer than 120 seconds is refused; request several ranges instead.
revisionintegerOptional committed project revision to measure; omission uses the current revision. Mix only.
idstringPoll one running mix measurement by the id its first call returned. Sending id reads that measurement and renders nothing.
{
"type": "object",
"description": "Select analysis kinds and optionally limit source assets.",
"properties": {
"media": {
"type": "array",
"description": "Bound-library assets to analyze; omission selects project media.",
"items": {
"$ref": "#/components/schemas/cut-MediaRef"
}
},
"kinds": {
"type": "array",
"description": "Analysis types to request. silence, filler, scenes and beats analyze the selected source assets and are read from the media library; mix measures the project's own rendered mix and is requested on its own.",
"items": {
"type": "string",
"description": "silence finds transcript-based speech pauses, not music or loudness; filler finds filler words; scenes finds visual scene ranges; beats returns a music asset's measured beat grid, one range per beat, labelled by its place in the bar (\"1\" is a downbeat), so cuts can land on the beat or on the bar; an asset whose audio was never measured is measured on request, and the call answers pending with retry_after_sec until the grid is ready; mix measures the project's own mix over a range, per role, and reports where speech is masked by music.",
"enum": [
"silence",
"filler",
"scenes",
"beats",
"mix"
],
"example": "silence"
}
},
"from": {
"type": "number",
"description": "Range start for kind mix, in seconds on the project clock. Omitted with to, the whole timeline is measured, capped at 120 seconds. Ignored by the asset kinds.",
"minimum": 0
},
"to": {
"type": "number",
"description": "Range end for kind mix, in seconds on the project clock, exclusive. An end up to 0.05 s past the timeline's end (a rounded duration) is read as the end; further past is refused. A range longer than 120 seconds is refused; request several ranges instead.",
"minimum": 0
},
"revision": {
"type": "integer",
"description": "Optional committed project revision to measure; omission uses the current revision. Mix only.",
"minimum": 0
},
"id": {
"type": "string",
"description": "Poll one running mix measurement by the id its first call returned. Sending id reads that measurement and renders nothing.",
"example": "cutr_0123456789abcdefghjk"
}
},
"required": [
"kinds"
]
}

响应

HTTP 200

Requested resource or operation result; use its revision when preparing a guarded edit.

application/json

名称 类型 说明
results array<object> Per-asset analysis outcomes.
results[].media object Reference to an asset in a bound library; follows asset overwrites to the latest version rather than pinning a version.
results[].version integer Source asset version analyzed; changes when that asset is overwritten.
results[].kind string silence identifies transcript-based speech pauses, not music or loudness; filler identifies filler-word spans; scenes identifies scene ranges; beats lists the measured beats of a music asset, labelled "1", "2", … by their place in the bar, so "1" marks a downbeat; tempo in BPM is 60 divided by a beat's length.
results[].status string pending means analysis is still running; ready means analysis completed, including an empty no_speech result; unsupported means no usable transcript or this analysis kind is inapplicable; failed means analysis did not complete.
results[].reason string no_speech means a completed current-version transcript contains no words (ready with empty segments); no_transcript means no completed current-version transcript is available (unsupported). no_music means the media library measured the asset and found no music, so it has no beat grid; not_measured means the asset's audio has not been measured and the measurement could not be requested (an unmeasured asset is otherwise measured on request and answers pending). Failed transcriptions and measurements remain failed.
results[].segments array<object> Detected source ranges in seconds, available when status is ready.
results[].retry_after_sec number Suggested delay before checking a pending analysis again. In seconds, not frames or microseconds.
kind string Always mix; distinguishes this reply from the per-asset analysis results.
from number Range start on the project clock. In seconds, not frames or microseconds.
to number Range end on the project clock, exclusive. In seconds, not frames or microseconds.
revision integer Project revision measured.
status string pending means the measurement is still rendering, not that it is complete; ready means the mix is below; failed means it did not complete.
id string The measurement's own id. Pass it back with kind mix to poll; a measurement is never listed, so this is the only handle on it.
retry_after_sec number Suggested delay before polling again; present while status is pending. In seconds, not frames or microseconds.
error object Why a failed measurement did not complete.
error.code string Machine-readable failure code.
error.message string Bounded human-readable cause; provider text and capability URLs are stripped.
created string When the measurement was requested, RFC 3339.
finished string When it reached ready or failed, RFC 3339.
mix object The measurement, present once status is ready. loudness is the whole mix — what a listener hears — and roles is the same measurement per role, so a problem can be attributed to the voice or to the bed.
mix.loudness object Loudness of one rendered mix, measured with ffmpeg ebur128 over the range (ADR-071). The shape is the asset-side loudness shape (BS.1770-4); only the gating series it does not need is absent.
mix.roles object Per-role loudness. A role the timeline carries no clip of is null, never a silent render.
mix.dialogue_to_music_db array<object> Voice against music, second by second, merged into runs of one sign and empty when either role is absent. A run's value is the mean over its seconds.
mix.masked_speech array<object> Where speech is masked — the voice is audible and sits less than 10 dB above the music. Music alone is never masked speech, and a silent voice is not speech.
mix.music_swells array<object> Where the music swells in a pause between sentences — the voice pauses for at most 3 seconds and the music rises 4 dB or more above its level under the speech on either side. That is a duck letting go between sentences and is heard as pumping; give the duck a longer hold, or use the default occupancy duck under continuous narration.
mix.music_balance object | null The music bed against the voice, as one move to make. Music should sit about 18 LU under the voice (15–24 is fine); a bed too loud for the voice is what makes a duck pump, because the music is pulled down hard under every sentence and springs back in every pause. Null when the range lacks either a voice or a music role.