Cuts the source range of the words from_word to to_word (inclusive indices into the transcript of the asset) out of every clip and audio item that shows the asset, so the video clip and its linked sound are cut together. The pieces close up from the start of each item and the later items of the same track move earlier. Captions linked to a cut clip move their link to the piece that holds their first word; caption.retime_from_clip re-syncs them. The words come from the transcript of the asset and are supplied by the service in resolved; the command never starts a job.
Arguments#
| Argument | Type | Required | Notes |
|---|---|---|---|
asset_id | string | yes | A video asset with audio, or an audio asset, that was transcribed.; pattern ^ast_[0123456789abcdefghjkmnpqrstvwxyz]{10}$ |
from_word | integer | yes | Index of the first word to remove, in the transcript of the asset.; min 0 |
new_ids | array of string | no | Ids for the new pieces, in order of cut. |
snap | string | no | A length, 0 to 2s; the farthest an edge of the cut may move into a silence beside it. Default "0.3s"; "0s" cuts at the word times. |
to_word | integer | yes | Index of the last word to remove, inclusive.; min 0 |
Errors#
Scope#
Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help transcript.delete_range for the same description from the binary, or call the command_help tool.
Next steps#
As an MCP call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "edit",
"arguments": {
"project_id": "prj_7k2m9x4q1b",
"base_revision": 12,
"operations": [
{
"op": "transcript.delete_range",
"args": {
"asset_id": "ast_3c5v8n2w6d",
"from_word": 4,
"to_word": 9
}
}
]
}
}
}As a batch file for the CLI
[
{
"op": "transcript.delete_range",
"args": {
"asset_id": "ast_3c5v8n2w6d",
"from_word": 4,
"to_word": 9
}
}
]stuarty edit --project prj_7k2m9x4q1b --ops batch.json --jsonOver HTTP
curl -X POST "http://127.0.0.1:7878/api/v1/projects/prj_7k2m9x4q1b/edit" \
-H "Authorization: Bearer $STUARTY_KEY" \
-H "Content-Type: application/json" \
-d '{
"base_revision": 12,
"operations": [
{
"op": "transcript.delete_range",
"args": {
"asset_id": "ast_3c5v8n2w6d",
"from_word": 4,
"to_word": 9
}
}
]
}'The ids in the example are illustrative: read the real ones with project_get.