The VS Code of video editing, built for agents.
TypeScript
Rename `transcript` command to `transcribe` across CLI, API, and documentation for consistency. Updated related types, functions, and command descriptions to reflect the new terminology.
konstantin-paulus0e2dac7eecc5
diff --git a/README.md b/README.mdindex 6b7ecdd2..9f9e8b6f 100644--- a/README.md+++ b/README.md@@ -63,7 +63,7 @@ Cutting footage requires looking at it. The CLI ships the inspection tools an agdapi asset probe clip.mp4 # container + codec metadata, like ffprobedapi asset frame clip.mp4 -t 0 12 45 # decode frames to PNGsdapi asset visualize track.mp3 # waveform / filmstrip previews-dapi asset transcript interview.wav # timed, word-level transcript+dapi asset transcribe interview.wav # timed, word-level transcriptdapi asset analyze b-roll.mp4 -p "when is the product shown?" # ask a vision modeldapi node screenshot # see the canvas itself```@@ -76,7 +76,7 @@ dapi node screenshot # see the canvas itself| `dapi context` | Summary of the open project: scenes, playhead, fonts || `dapi mount` | Compile and mount a JSX composition || `dapi node …` | The scene graph: `ls`, `tree`, `grep`, `patch`, `insert`, `cp`, `rm`, `screenshot`, `export` |-| `dapi asset …` | The media library: `add`, `ls`, `probe`, `frame`, `visualize`, `analyze`, `transcript`, `export` |+| `dapi asset …` | The media library: `add`, `ls`, `probe`, `frame`, `visualize`, `analyze`, `transcribe`, `export` || `dapi project …` / `dapi folder …` / `dapi selection …` | Projects, library folders, canvas selection || `dapi models` / `dapi voices` / `dapi fonts` | Discover generation models, speech voices, local fonts |diff --git a/apps/cli/api-spec.md b/apps/cli/api-spec.mdindex deabb0b0..2b8b2a2b 100644--- a/apps/cli/api-spec.md+++ b/apps/cli/api-spec.md@@ -4,7 +4,7 @@ User-facing reference for the `dapi` CLI. All canvas/project commands talk to th**Top-level:** `open`, `whoami`, `context` (alias `ctx`), `mount`, `models`, `voices`.**Groups:** `selection` (alias `sel`), `node` (aliases `n`, `entity`), `project` (alias `p`), `asset` (alias `a`), `folder` (alias `fld`), `font` (alias `f`).-Selection reads and mutations live under `selection`. Anything that targets one or more nodes lives under `node` — scenes are nodes too; they are created declaratively via `mount` (`<scene key="...">`). Declarative composition happens through `mount`, which renders a Solid JSX project into the canvas (see [jsx-spec.md](./jsx-spec.md)); `node insert` runs the same pipeline but inserts the rendered nodes into an existing parent entity instead of mounting document roots. AI asset generation (image / video / speech / audio) is **declared in the project module** and produced on mount (see the JSX API); the `models` and `voices` commands list what's available to reference from those declarations. Inspecting an existing asset (probe / transcript / analyze / visualize / frame) lives under `asset`; writing an asset's original file back out to disk is `asset export`. Organizing the asset library into folders lives under `folder`; moving assets between folders is `asset mv`.+Selection reads and mutations live under `selection`. Anything that targets one or more nodes lives under `node` — scenes are nodes too; they are created declaratively via `mount` (`<scene key="...">`). Declarative composition happens through `mount`, which renders a Solid JSX project into the canvas (see [jsx-spec.md](./jsx-spec.md)); `node insert` runs the same pipeline but inserts the rendered nodes into an existing parent entity instead of mounting document roots. AI asset generation (image / video / speech / audio) is **declared in the project module** and produced on mount (see the JSX API); the `models` and `voices` commands list what's available to reference from those declarations. Inspecting an existing asset (probe / transcribe / analyze / visualize / frame) lives under `asset`; writing an asset's original file back out to disk is `asset export`. Organizing the asset library into folders lives under `folder`; moving assets between folders is `asset mv`.Shared types used below:@@ -521,7 +521,7 @@ Reads the container and per-track technical metadata of an asset — like `ffpro----### `dapi asset transcript <id|path>`+### `dapi asset transcribe <id|path>`Transcribes the speech in a video or audio asset and returns the timed transcript. Word-level start/end times are in **seconds** (source/content time).diff --git a/apps/cli/src/cli-channels.ts b/apps/cli/src/cli-channels.tsindex 0990a115..da7a3517 100644--- a/apps/cli/src/cli-channels.ts+++ b/apps/cli/src/cli-channels.ts@@ -30,7 +30,7 @@ export const CLI_CHANNELS = {FOLDERS_DELETE: "cli:folders:delete",ASSET_PROBE: "cli:asset:probe",ASSET_FRAME: "cli:asset:frame",- ASSET_TRANSCRIPT: "cli:asset:transcript",+ ASSET_TRANSCRIBE: "cli:asset:transcribe",ASSET_VISUALIZE: "cli:asset:visualize",ASSET_ANALYZE: "cli:asset:analyze",SELECTION_LIST: "cli:selection:list",@@ -148,10 +148,10 @@ export type AssetProbeRequest = { id: string };export type AssetFrameRequest = { id: string; times?: number[] };export type AssetFrameResult = Array<{ time: number; base64: string }>;-export type AssetTranscriptRequest = { id: string };+export type AssetTranscribeRequest = { id: string };export type TranscriptWord = { text: string; start: number; end: number };export type TranscriptSegment = { text: string; words: TranscriptWord[] };-export type AssetTranscriptResult = { id: string; segments: TranscriptSegment[] };+export type AssetTranscribeResult = { id: string; segments: TranscriptSegment[] };export type AssetVisualizeRequest = { id: string; start?: number; end?: number; scale?: number };export type AssetVisualizeResult = {@@ -253,9 +253,9 @@ export type CliRequestMap = {request: AssetFrameRequest;response: AssetFrameResult;};- [CLI_CHANNELS.ASSET_TRANSCRIPT]: {- request: AssetTranscriptRequest;- response: AssetTranscriptResult;+ [CLI_CHANNELS.ASSET_TRANSCRIBE]: {+ request: AssetTranscribeRequest;+ response: AssetTranscribeResult;};[CLI_CHANNELS.ASSET_VISUALIZE]: {request: AssetVisualizeRequest;diff --git a/apps/cli/src/cli-client.ts b/apps/cli/src/cli-client.tsindex 01b71184..c773c98c 100644--- a/apps/cli/src/cli-client.ts+++ b/apps/cli/src/cli-client.ts@@ -90,8 +90,8 @@ export const cliAPI = {deleteFolders: (ids: string[]) => cliRequest(CLI_CHANNELS.FOLDERS_DELETE, { ids }),assetProbe: (id: string) => cliRequest(CLI_CHANNELS.ASSET_PROBE, { id }),assetFrame: (id: string, times?: number[]) => cliRequest(CLI_CHANNELS.ASSET_FRAME, { id, times }),- assetTranscript: (id: string) =>- cliRequest(CLI_CHANNELS.ASSET_TRANSCRIPT, { id }, GENERATE_TIMEOUT_MS),+ assetTranscribe: (id: string) =>+ cliRequest(CLI_CHANNELS.ASSET_TRANSCRIBE, { id }, GENERATE_TIMEOUT_MS),assetVisualize: (id: string, start?: number, end?: number, scale?: number) =>cliRequest(CLI_CHANNELS.ASSET_VISUALIZE, { id, start, end, scale }),assetAnalyze: (id: string, prompt?: string, start?: number, end?: number) =>diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.tsindex b98f1f14..2945609c 100644--- a/apps/cli/src/index.ts+++ b/apps/cli/src/index.ts@@ -489,11 +489,11 @@ async function assetProbe(ref: string): Promise<void> {}}-async function assetTranscript(ref: string): Promise<void> {+async function assetTranscribe(ref: string): Promise<void> {const assetId = await resolveAssetRef(ref);const stop = startSpinner("Transcribing asset");try {- const result = await cliAPI.assetTranscript(assetId);+ const result = await cliAPI.assetTranscribe(assetId);stop();console.log(JSON.stringify(result));} catch (e) {@@ -1010,10 +1010,10 @@ asset.action((ref: string) => assetProbe(ref));asset- .command("transcript")+ .command("transcribe").description("Transcribe the speech in a video or audio asset and print the timed transcript").argument("<id|path>", "video or audio asset id, or a local file to add and transcribe")- .action((ref: string) => assetTranscript(ref));+ .action((ref: string) => assetTranscribe(ref));asset.command("frame")diff --git a/apps/web/src/context/electron/assets.ts b/apps/web/src/context/electron/assets.tsindex cb68e3c4..9644339f 100644--- a/apps/web/src/context/electron/assets.ts+++ b/apps/web/src/context/electron/assets.ts@@ -20,7 +20,7 @@ import {import type { Engine } from "@/components/engine";import type { Asset } from "@/components/engine/db";-import type { AssetAnalyzeRequest, AssetAnalyzeResult, AssetExportResult, AssetMoveResult, AssetProbeRequest, AssetsExportRequest, AssetTranscriptResult, AssetTreeEntry, AssetVisualizeRequest, AssetVisualizeResult } from "@diffusionstudio/cli/channels";+import type { AssetAnalyzeRequest, AssetAnalyzeResult, AssetExportResult, AssetMoveResult, AssetProbeRequest, AssetsExportRequest, AssetTranscribeResult, AssetTreeEntry, AssetVisualizeRequest, AssetVisualizeResult } from "@diffusionstudio/cli/channels";import type { Accessor } from "solid-js";export function handleAssetsAdd(engine: Accessor<Engine>) {@@ -307,8 +307,8 @@ export function handleAssetFrame(engine: Accessor<Engine>) {};}-export function handleAssetTranscript(engine: Accessor<Engine>) {- return async ({ id }: { id: string }): Promise<AssetTranscriptResult> => {+export function handleAssetTranscribe(engine: Accessor<Engine>) {+ return async ({ id }: { id: string }): Promise<AssetTranscribeResult> => {const { world } = engine();const asset = world.assets.get(id);assert(asset, `Asset ${id} not found.`);diff --git a/apps/web/src/context/electron/electron.tsx b/apps/web/src/context/electron/electron.tsxindex 0853d6ca..db7a072e 100644--- a/apps/web/src/context/electron/electron.tsx+++ b/apps/web/src/context/electron/electron.tsx@@ -12,7 +12,7 @@ import { CLI_CHANNELS } from '@diffusionstudio/cli/channels';import { MAIN_CHANNELS } from '@desktop/main-channels';import { assert } from "@/utils/common";import { handleContextGet } from "./context";-import { handleAssetsAdd, handleAssetsList, handleAssetsDelete, handleAssetsMove, handleAssetsExport, handleAssetProbe, handleAssetFrame, handleAssetTranscript, handleAssetVisualize, handleAssetAnalyze } from "./assets";+import { handleAssetsAdd, handleAssetsList, handleAssetsDelete, handleAssetsMove, handleAssetsExport, handleAssetProbe, handleAssetFrame, handleAssetTranscribe, handleAssetVisualize, handleAssetAnalyze } from "./assets";import { handleFoldersList, handleFolderCreate, handleFolderRename, handleFoldersMove, handleFoldersDelete } from "./folders";import { handleSelectionFocus, handleSelectionList, handleSelectionSet } from "./selection";import { handleNodeList, handleNodeTree, handleNodeGrep, handleNodeScreenshot, handleNodeDelete, handleNodePatch, handleNodeDuplicate, handleNodeRender } from "./node";@@ -67,7 +67,7 @@ export function ElectronProvider(props: ElectronProviderProps) {const unsubFoldersDelete = cliBridge.handle(CLI_CHANNELS.FOLDERS_DELETE, handleFoldersDelete(engineRef));const unsubAssetProbe = cliBridge.handle(CLI_CHANNELS.ASSET_PROBE, handleAssetProbe(engineRef));const unsubAssetFrame = cliBridge.handle(CLI_CHANNELS.ASSET_FRAME, handleAssetFrame(engineRef));- const unsubAssetTranscript = cliBridge.handle(CLI_CHANNELS.ASSET_TRANSCRIPT, handleAssetTranscript(engineRef));+ const unsubAssetTranscribe = cliBridge.handle(CLI_CHANNELS.ASSET_TRANSCRIBE, handleAssetTranscribe(engineRef));const unsubAssetVisualize = cliBridge.handle(CLI_CHANNELS.ASSET_VISUALIZE, handleAssetVisualize(engineRef));const unsubAssetAnalyze = cliBridge.handle(CLI_CHANNELS.ASSET_ANALYZE, requireAuth(handleAssetAnalyze(engineRef)));const unsubSelectionList = cliBridge.handle(CLI_CHANNELS.SELECTION_LIST, handleSelectionList(engineRef));@@ -106,7 +106,7 @@ export function ElectronProvider(props: ElectronProviderProps) {unsubFoldersDelete();unsubAssetProbe();unsubAssetFrame();- unsubAssetTranscript();+ unsubAssetTranscribe();unsubAssetVisualize();unsubAssetAnalyze();unsubSelectionList();diff --git a/docs/assets.md b/docs/assets.mdindex 0663dc9a..09129459 100644--- a/docs/assets.md+++ b/docs/assets.md@@ -1,6 +1,6 @@# Working with media-The asset library holds a project's media. Beyond storage, the CLI ships an inspection toolchain (probe, decode, visualize, transcribe, analyze) so an agent can *look at* footage before cutting it. All of it runs locally except `analyze` and `transcript`, which use hosted models.+The asset library holds a project's media. Beyond storage, the CLI ships an inspection toolchain (probe, decode, visualize, transcribe, analyze) so an agent can *look at* footage before cutting it. All of it runs locally except `analyze` and `transcribe`, which use hosted models.**Id or path:** every inspection command takes either an asset id or a local file path. A path is imported into the library first, then inspected, so `dapi asset probe clip.mp4` works on a file that isn't in the project yet.@@ -53,10 +53,10 @@ dapi asset visualize <id|path> [-s <start>] [-e <end>] [-x <scale>] [-o <path>]Renders a one-image preview chosen by media type: audio gets an amplitude **waveform** with a time axis, video gets a **filmstrip** of evenly sampled frames with the audio waveform beneath it, and images get a thumbnail. `-s`/`-e` window the preview; `-x` trades thumbnail size against grid density. Prints `{ path }`.-### `asset transcript`+### `asset transcribe````sh-dapi asset transcript <id|path>+dapi asset transcribe <id|path>```Transcribes speech in a video or audio asset. Returns segments with **word-level start/end times in seconds**: the raw material for caption timing, jump cuts, and content search.@@ -77,7 +77,7 @@ dapi open -b ./shoot # project from footagedapi asset ls --depth 1 # what's here?dapi asset probe gbHJ # what format is it?dapi asset visualize gbHJ # what does it look like over time?-dapi asset transcript gbHJ # what is said, and when?+dapi asset transcribe gbHJ # what is said, and when?dapi asset analyze gbHJ -p "best moment for a thumbnail?"dapi mount cut.tsx # compose the editdapi node screenshot # verify visuallydiff --git a/docs/cli.md b/docs/cli.mdindex 3a047d97..42752713 100644--- a/docs/cli.md+++ b/docs/cli.md@@ -176,7 +176,7 @@ dapi project rm <id> # delete## Assets and folders-The library commands (`asset add/ls/mv/rm/export`, `folder ls/create/rename/mv/rm`) and the media-inspection commands (`probe`, `transcript`, `analyze`, `visualize`, `frame`) are covered in [Working with media](assets.md).+The library commands (`asset add/ls/mv/rm/export`, `folder ls/create/rename/mv/rm`) and the media-inspection commands (`probe`, `transcribe`, `analyze`, `visualize`, `frame`) are covered in [Working with media](assets.md).## Discovery