- Updated the `AssetRef` type to only accept paths, simplifying asset reference management. - Refactored media command descriptions to clarify that local files and URLs can be used without an open project, while library paths require one. - Enhanced error handling in media commands to specify when paths cannot be resolved, improving user feedback. - Removed the deprecated `ShellApi` component and integrated its functionality into the new `EditorApi` for better organization and clarity.
27 lines
911 B
Markdown
27 lines
911 B
Markdown
# `dapi media transcribe <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).
|
|
|
|
## Input
|
|
|
|
- `<path>`: a local video or audio file to transcribe in place without adding it to the library, or a project library path (required; library paths need an open project).
|
|
|
|
The whole asset is transcribed once per app session (cached in memory, keyed by file content; an app restart or an edited file re-transcribes).
|
|
|
|
## Output
|
|
|
|
One JSON object, the transcript:
|
|
|
|
```ts
|
|
{
|
|
segments: Array<{
|
|
text: string; // spoken words only (no silence markers)
|
|
words: Array<{ text: string; start: number; end: number }>; // seconds
|
|
}>;
|
|
}
|
|
```
|
|
|
|
## Errors
|
|
|
|
Exits non-zero if the path can't be resolved or the asset is not a video/audio asset, or if no speech is detected in the audio at all (`No speech detected`).
|