clean_script
Mechanical first-pass cleanup of talking-head speech already on the timeline: removes a fixed filler list and batch-compresses or restores pauses. It writes the timeline immediately and has no preview. Both run by default; only picks one. Runs incrementally and preserves item decoration and earlier Script edits.
Fillers removed: EN um / uh / er / ah; ZH 呃 / 额. Not removed: 呢 / 啊 / 嗯 / mm / hmm, stutters, repeats, retakes. When the user wants one of those gone, strike it in Script, e.g. [s1] 过去~~呢~~一个月.
Pauses: translate the request into the silence rule: "tighter breaths" → default compress:250; "only pauses over 0.8s" → longSilence: 800; "keep at least 0.5s" → restore:500. Whole-track cleanup also trims padding before the first and after the last spoken word, including a recording tail. Silence markers do not need to be visible first.
If the user asks to preview the whole edit before it is applied, do not call clean_script. Call read_script({showSilence:true}), stage the filler strikes, semantic edits, and pause rewrites [silence=Xs→Ys] (Unicode →) together in timeline.md, then apply_script({preview:true}). A struck filler joins the pauses on both sides, so a 250ms cap is their combined total. When the preview succeeds and the request already authorizes applying, apply without preview; if the user asked only for a preview, stop.
Not for: specific word deletions, choosing retakes, duplicate sentences, or any edit that depends on meaning (use Script), and ASR text fixes (manage_transcript action fix). After cleanup, continue from the bounded result; read Script only when semantic editing starts.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "clean_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| only | No | `fillers`, `silence`, or both as `fillers,silence`. Default runs both. | |
| track | No | Track alias (`V1`, `A1`, …) to scope to one track. Omit to clean the first timeline track containing transcribed media. | |
| silence | No | Pause rule. Default compression is `"compress:250"`, which shortens pauses longer than 250ms to 250ms. Other forms: `"restore:500"` makes short pauses longer up to 500ms only when that pause was already that long in the original recording; `"normalize:500"` moves every editable pause toward 500ms; `"range:300-800"` keeps pauses between 300ms and 800ms; `"normalize:500,range:300-800"` changes only pauses whose current duration is 300–800ms, setting them toward 500ms while leaving shorter and longer pauses alone. Any rule that makes a pause longer never invents new silence; it only recovers pause time that already existed at that exact spot. Legacy syntax also works: `"max:400"`, `"min:500"`, `"500"`, `"min:300,max:800"`. To skip silence entirely, pass `only="fillers"`. | |
| projectId | No | Project for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise. | |
| timelineId | No | ||
| longSilence | No | Long-pause-only mode: process pauses at least this many ms long and shorten them to the default 250ms. Omit for normal compress:250 behavior. Ignored when `silence` is set. |