You will learn#
- how a clip becomes a transcriptThe whole text of what is said in a video. and the transcript becomes captions;
- how to use Auto captions in the editor;
- where the audio is processed, and how to use a transcriptionTurning speech into written words, by a person or by a program. API instead.
The idea#
Transcription is a job. It reads the audio of an imported asset and stores the words with their start and end times. The transcript belongs to the asset, so a second clip of the same asset reuses it. Auto captions then groups the words of the visible range of a clip into captions on a caption track and links them to the clip.
By default transcription runs on your computer with whisper.cpp and a model you install once: tiny, base, small (the default) or large-v3-turbo. The download is an explicit step, announced with its size and host before it starts, and nothing is downloaded at any other time. When the files are missing, the job fails with E_TRANSCRIBE_UNAVAILABLE and the editor offers to install them.
An operator can point the server to an OpenAI-compatible transcription API with STUARTY_TRANSCRIBE_URL, STUARTY_TRANSCRIBE_KEY and STUARTY_TRANSCRIBE_MODEL. Then the audio of the asset (and nothing else) is sent to that host, and the job message says which host receives it. With no URL set, no audio leaves the machine. See Privacy.
Quick start#
In the editor, select a clip that has audio and open Auto captions in the inspector:
- Choose the caption track, or a new one.
- Set the words per caption, the characters per caption and the pause that starts a new caption.
- Press Generate captions. If local transcription is not installed, the dialog offers to install it, or shows the command to run in a terminal.
- After you retime or edit the clip, press Re-sync captions to follow it.
stuarty tools:install whisper --model small # a person, in a terminal; works while the server runs
stuarty transcribe --project prj_7k2m9x4q1b --asset ast_3c5v8n2w6d --language en
stuarty edit --project prj_7k2m9x4q1b caption.from_transcript \
clip_item_id=itm_m1n2p3q4r5 track_id=trk_f6g7h8j9k0 max_words:=4job_start with {"project_id": "prj_7k2m9x4q1b", "kind": "transcribe", "args": {"asset_id": "ast_3c5v8n2w6d"}, "wait_ms": 25000}, then media_inspect with "sections": ["transcript"] to read the words, then edit with:
{ "op": "caption.from_transcript", "args": {
"clip_item_id": "itm_m1n2p3q4r5", "track_id": "trk_f6g7h8j9k0"
} }caption.from_transcript defaults to 5 words and 28 characters per caption and a pause of 0.6s. With replace (the default) the captions already linked to the clip on that track are removed first. caption.retime_from_clip moves the linked captions after the clip changed. Style captions with track.set_caption_style and fix a word with caption.edit_word.
Edit by text#
Once an asset has a transcript, the Transcript section of the Captions tab shows its words. Click a word, or click one and Shift-click another, and press Delete selected words: the video is cut under those words and the gap closes, on every clip and audio item that shows the asset, as one undo step. A word the timeline no longer shows is struck through. Under the hood this is the command transcript.delete_range with the index of the first and the last word; read the indices and the timeline range of each word with media_inspect and the section words, or stuarty transcript:show.
Find fillers and repetitions lists words such as "um" and "uh" and sequences said twice ("we should we should"). It removes nothing: strong suggestions come checked, weak ones unchecked, and the video changes only when you press Remove 3 checked (the number is how many you checked). An agent reads the same list with the section fillers (or stuarty transcript:fillers).
Cut in the silence beside the words is on by default. The edges of a cut move to the nearest pause of the recording that the import already measured (at most 0.3 seconds away, never into a neighbouring word of the transcript), so a deleted "um" is less likely to clip the next word or leave a sliver of itself. The panel says how many edges moved, how many were already in a pause and how many found none. Switch it off, or send snap as "0s" to transcript.delete_range, to cut exactly at the word times; a recording imported before the pause analysis existed is cut at the word times and the panel says so. Snapping only widens a cut into the gap between two words: it cannot fix a word that the transcription placed wrongly inside a run of speech, where there is no pause to land in, and it does not move the words you did not choose.
What it can find depends on what the transcription wrote. In a measurement on synthetic speech, repetitions were found in both languages, English fillers that the transcription kept were found, and Portuguese hesitations were mostly written as the words "um" and "é", which are never flagged. A word inside a run of speech starts a few tenths of a second off the audible start, so a cut inside a sentence can clip a neighbouring word; a sentence that starts after a pause is usually cut within about a tenth of a second of its start. Look at the result before you export.
Vertical cuts of a long talk#
For a video of someone talking to the camera, the Text tab of a clip also has Vertical cuts. It finds the stretches of 20 to 60 seconds that start and end at the end of a sentence and in which the speaker is on screen, and proposes up to five. Each one you keep becomes a new 9:16 timeline of the project, made when you press Create 2 timelines (the number is how many you chose), with the clip trimmed to the range and its crop moving to keep the face in frame. Nothing is created until you choose cuts and press Create timelines.
Finding the face runs on your computer, with a small helper, the ONNX Runtime library and the YuNet face model. They are not installed with the product: the first time you press Find vertical cuts the editor shows what would be downloaded, its size, the host it comes from, its licences and the dataset the model was trained on, and downloads nothing until you press Install. In a terminal the same step is stuarty tools:install face. The asset also needs a transcript (see above); the face job (job_start with "kind": "face_track") and the proposals (GET /projects/{id}/cuts?asset_id=) work without the editor. The framing itself is the command clip.face_frame.
Common mistakes#
- Running
caption.from_transcriptbefore the transcript exists. Start the transcription job and wait for it first. - Transcription is queued behind others:
STUARTY_MAX_TRANSCRIBESandSTUARTY_MAX_TRANSCRIBES_PER_KEYlimit how many run at once. - A source longer than
STUARTY_MAX_TRANSCRIBE_SECONDS(2 hours by default) is refused.