Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions website/content/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: Getting Started
description: Install OpenBBQ, create a workspace, and understand the processing model.
description: Install OpenBBQ and run the default one-prompt Agent workflow.
---

<Cards>
<Card title="Installation" href="/en/docs/getting-started/installation">
Requirements, CLI installation, models, upgrades, and development setup.
Install the CLI, ASR backend, model, and packaged Agent skill.
</Card>
<Card title="Quickstart" href="/en/docs/getting-started/quickstart">
A complete local-video workflow from source to bilingual ASS.
One prompt for either a URL or local video, through final delivery.
</Card>
<Card title="Workflow model" href="/en/docs/getting-started/workflow">
Workspaces, stage invalidation, status, artifacts, and reruns.
Agent actions, leases, workspaces, artifacts, and recovery.
</Card>
</Cards>
8 changes: 4 additions & 4 deletions website/content/docs/getting-started/index.zh.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: 入门
description: 安装 OpenBBQ、创建 workspace,并理解处理模型
description: 安装 OpenBBQ,并运行默认的一句话 Agent 工作流
---

<Cards>
<Card title="安装" href="/zh/docs/getting-started/installation">
前置要求、CLI 安装、模型、升级和开发环境
安装 CLI、ASR 后端、模型和随包 Agent Skill
</Card>
<Card title="快速开始" href="/zh/docs/getting-started/quickstart">
从本地视频到双语 ASS 的完整工作流
URL 或本地视频都用一句提示词完成交付
</Card>
<Card title="工作流模型" href="/zh/docs/getting-started/workflow">
Workspace、阶段失效、状态、产物和重跑方式
Agent action、lease、workspace、产物与恢复方式
</Card>
</Cards>
22 changes: 17 additions & 5 deletions website/content/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,24 @@ description: Install OpenBBQ and the dependencies required by your workflow.
OpenBBQ is pre-alpha. The current workflow is developed primarily on macOS; Windows and Linux support is still on the roadmap.
</Callout>

## Install the CLI
## Install the CLI and Agent skill

Install the published package with the whisper.cpp backend and the local review UI:
Install the published package with the default whisper.cpp backend:

```bash
uv tool install 'openbbq[whispercpp,review]'
uv tool install 'openbbq[whispercpp]'
openbbq skill install --agent all
```

If you do not need browser-based subtitle review, the `review` extra may be omitted.
The skill teaches supported Agents to follow the one authoritative
`agent next/apply/finish` workflow. Use `--agent codex`, `--agent claude`, or
the default shared `agents` target when only one installation is needed.

Professional users who want the local browser review UI can include its extra:

```bash
uv tool install --force 'openbbq[whispercpp,review]'
```

If the `openbbq` command is not found after installation, follow the PATH instruction printed by uv, then open a new shell.

Expand Down Expand Up @@ -79,6 +88,7 @@ Downloads are resumable and stored under `~/.openbbq/models/whisper.cpp/` by def

```bash
openbbq doctor
openbbq --version
openbbq --help
```

Expand All @@ -88,9 +98,11 @@ For hard-subtitle workflows, confirm that `ffmpeg subtitle filters` reports both

```bash
uv tool upgrade openbbq
openbbq skill install --agent all --force
openbbq doctor
```

To change extras or repair the installation:
To change extras or repair the CLI installation:

```bash
uv tool install --force 'openbbq[whispercpp,review]'
Expand Down
22 changes: 17 additions & 5 deletions website/content/docs/getting-started/installation.zh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,24 @@ description: 安装 OpenBBQ,以及当前工作流需要的依赖。
OpenBBQ 仍处于 pre-alpha 阶段,当前工作流主要在 macOS 上开发;Windows 和 Linux 支持仍在路线图中。
</Callout>

## 安装 CLI
## 安装 CLI 与 Agent Skill

安装发布包、whisper.cpp 后端和本地审核界面
安装发布包和默认 whisper.cpp 后端

```bash
uv tool install 'openbbq[whispercpp,review]'
uv tool install 'openbbq[whispercpp]'
openbbq skill install --agent all
```

如果不需要浏览器字幕审核,可以省略 `review` extra。
Skill 会指导受支持的 Agent 遵循唯一权威的 `agent next/apply/finish` 工作流。只需
安装一个目标时,可使用 `--agent codex`、`--agent claude`,或默认共享的 `agents`
目标。

专业用户需要本地浏览器审核界面时,再加入对应 extra:

```bash
uv tool install --force 'openbbq[whispercpp,review]'
```

如果安装后找不到 `openbbq`,按 uv 输出的提示配置 PATH,然后打开新的 shell。

Expand Down Expand Up @@ -79,6 +88,7 @@ openbbq models pull large-v3-turbo

```bash
openbbq doctor
openbbq --version
openbbq --help
```

Expand All @@ -88,9 +98,11 @@ openbbq --help

```bash
uv tool upgrade openbbq
openbbq skill install --agent all --force
openbbq doctor
```

修改 extra 或修复安装
修改 extra 或修复 CLI 安装

```bash
uv tool install --force 'openbbq[whispercpp,review]'
Expand Down
152 changes: 54 additions & 98 deletions website/content/docs/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -1,141 +1,97 @@
---
title: Quickstart
description: Create bilingual subtitles from a local video, one explicit stage at a time.
description: Create an editable bilingual subtitle draft and hard-subtitled video with one Agent prompt.
---

This guide uses an English local video and produces Chinese-over-English ASS subtitles. Replace paths and language codes to match your material.
This is the recommended path for both online videos and local files. OpenBBQ
handles workflow state and validation; your Agent handles the semantic
translation.

## 1. Check the environment
## 1. Check the installation

```bash
openbbq --version
openbbq doctor
openbbq models list
```

If you do not have a cached model yet:
Install a production ASR model if one is not already cached:

```bash
openbbq models pull large-v3-turbo
```

## 2. Create a workspace
Make sure the packaged skill is current:

```bash
openbbq init --workspace workspaces/demo /path/to/video.mp4
openbbq skill install --agent all --force
```

`init` records the source and creates `workspaces/demo/manifest.json`. It does not copy or process the video.
## 2. Send one prompt

Move into the workspace so later commands can discover it automatically:
Give your Agent a URL:

```bash
cd workspaces/demo
openbbq status
```

You can stay elsewhere and pass `--workspace workspaces/demo` to every command instead.

## 3. Normalize the audio

```bash
openbbq extract-audio
```

This writes `media/audio.16k.wav`, a 16 kHz mono WAV suitable for ASR.

## 4. Transcribe

```bash
openbbq transcribe --model large-v3-turbo --language en --gpu
```

The result is `transcript.json`. `--gpu` is the default; use `--cpu` if the native backend cannot use the available accelerator or fails in a restricted environment.

If the model name is missing from the cache, either pull it first or opt into automatic download:

```bash
openbbq transcribe --model large-v3-turbo --language en --auto-download
```

## 5. Build subtitle cues

```bash
openbbq segment
```

This deterministically converts the transcript into `cues.json`, using a language profile for timing, characters per line, and characters per second. The result reports any over-CPS or over-width cues for review.

## 6. Create a translation worksheet
> Make this video into a bilingual Chinese-English subtitled video:
> https://www.youtube.com/watch?v=...

```bash
openbbq translate init zh
```
Or a local path:

Open `translation.zh.json`. Every item has a stable cue `id`, source text, timing information, translation budget, and a `target` field to fill.
> Make `/path/to/video.mp4` into a bilingual Chinese-English subtitled video.

For a small project, edit the `target` fields directly. For repeatable batches, create a JSON object:
You do not need to describe download, ASR, batching, glossary maintenance,
subtitle export, or burning. The Agent skill supplies those instructions.

```json
{
"1": "第一句译文",
"2": "第二句译文"
}
```
## 3. Let the Agent finish

Save it as `targets.json`, then merge it:
The normal run is:

```bash
openbbq translate apply zh targets.json
openbbq translate check zh
```text
fetch (URL only) -> extract audio -> transcribe -> validate/segment
-> translate in batches of at most 20 cues
-> export ASS -> burn once -> delivery check -> done
```

`apply` is repeatable. `check` reports missing cues, translations over budget, and glossary term warnings.

## 7. Export bilingual ASS

```bash
openbbq export --to zh --mode bilingual --format ass --ass-preset fansub
```
OpenBBQ returns one authoritative next action at a time. Mechanical actions
include exact command arguments and an execution policy. GPU transcription,
authenticated fetches, and final burning may need to run outside a restricted
sandbox. The Agent should not silently replace an available host GPU with CPU.

The default output is `out/zh.ass`. Bilingual mode renders the target language above the source language.
Translation batches include the target-language rules, title and author,
neighbor context, and matching glossary terms. If a translation reveals an
obvious ASR error, the Agent can submit a cue-scoped source fix. Reusable fixes
become glossary candidates and are published safely after successful delivery.

Preview the ASS file in a compatible player before burning it into a video.
## 4. Receive the outputs

## 8. Burn subtitles (optional)
A completed `done` response returns:

```bash
openbbq burn
```
- `out/zh.ass`: editable bilingual ASS subtitles;
- `out/zh-burned.mp4`: the hard-subtitled video;
- `quality: "draft"` unless a complete current human review exists;
- `human_reviewed: false` for the normal automatic path;
- any non-blocking quality or glossary publication warnings.

`burn` uses the last exported ASS artifact and creates `out/zh-burned.mp4`. It requires a video source and FFmpeg with libass filters.
The default workflow exports and burns once. It does not run visual QA or
automatically switch to `fansub-compact`.

## Inspect progress at any time
<Callout title="Expected quality">
The automatic result is intended as a useful 70–80 point first draft. It
should remain aligned and structurally valid, but it is not a promise that
every cue has been professionally verified.
</Callout>

```bash
openbbq status
```
## Continue with professional editing

For scripts or agents:
Open the same workspace in the optional browser editor:

```bash
openbbq --json status
openbbq review --workspace /path/to/workspace --to zh
```

Long-running commands update `manifest.json`; another process can poll `status` without parsing progress bars.

## Final workspace

```text
workspaces/demo/
├── manifest.json
├── media/
│ └── audio.16k.wav
├── transcript.json
├── cues.json
├── translation.zh.json
└── out/
├── zh.ass
└── zh-burned.mp4
```
You can also import `out/zh.ass` into Aegisub or an NLE. Human edits are
authoritative; do not rerun the automatic Agent workflow over completed manual
work.

Next, see [Local files and online video](/en/docs/guides/sources) for URL sources or [Export and burn](/en/docs/guides/export-and-burn) for SRT, ASS modes, and presets.
For authentication and local-file details, see [Local files and online
video](/en/docs/guides/sources). Agent implementers can read [Agents and
JSON](/en/docs/guides/agents).
Loading