dsh-ai-subtitle 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +52 -5
- package/README.ja.md +34 -3
- package/README.ko.md +34 -3
- package/README.md +33 -3
- package/client.js +812 -29
- package/docs/DETAIL.md +1 -1
- package/docs/PLAN.md +3 -3
- package/docs/REVIEW.md +105 -0
- package/index.js +191 -5
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +4 -2
- package/scripts/check-client.mjs +17 -0
- package/src/api.js +394 -21
- package/src/cues.js +28 -4
- package/src/feedback.js +59 -0
- package/src/glossary.js +252 -0
- package/src/hints.js +32 -0
- package/src/jobs.js +18 -0
- package/src/llm.js +177 -0
- package/src/messages.js +19 -0
- package/src/paths.js +11 -0
- package/src/recent.js +34 -0
- package/src/review.js +317 -0
- package/src/runtime.js +30 -8
package/README.en.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-ai-subtitle)
|
|
8
8
|
[](https://nodejs.org/)
|
|
9
9
|
|
|
10
|
-
<!-- translated-from: README.md sha256:
|
|
10
|
+
<!-- translated-from: README.md sha256:18d65a239037 -->
|
|
11
11
|
|
|
12
12
|
A subtitle plugin for DeepSeek Harness (DSH) that turns Japanese video into bilingual
|
|
13
13
|
Japanese/Chinese SRT files. The plugin installs every runtime component it needs
|
|
@@ -35,9 +35,52 @@ video/audio ──ffmpeg──▶ 16 kHz wav ──energy VAD + Whisper──▶
|
|
|
35
35
|
- **Cue editing**: edit the Japanese and Chinese text, split a cue, merge it with the
|
|
36
36
|
next one, adjust either edge in 0.1 s steps, or restore derived timing.
|
|
37
37
|
- **SRT export**: UTF-8 BOM with CRLF line endings, validated against fragment coverage.
|
|
38
|
+
- **Automatic translation**: batches go to the model already configured in DSH, with the glossary and your notes; a manual paste path remains when no model is available.
|
|
39
|
+
- **Background and glossary**: project-level tags and a note join every translation prompt; the
|
|
40
|
+
glossary imports and exports as CSV and rewrites misheard names deterministically.
|
|
41
|
+
- **Japanese proofreading**: an optional pass corrects ASR errors (homophones, dropped words,
|
|
42
|
+
broken sentences) before translating and reports how many lines changed.
|
|
43
|
+
- **Projects folder**: defaults to Documents, can be moved with the existing projects, and opens
|
|
44
|
+
in the file manager from the panel.
|
|
45
|
+
- **Recent files**: the media picker expands into recent files and folders.
|
|
46
|
+
- **Line deletion**: deleting a cue marks it as skipped, so coverage and export stay valid.
|
|
38
47
|
- **File browser**: in-app picker with quick locations that remembers the last directory.
|
|
39
48
|
|
|
40
|
-
Not implemented yet:
|
|
49
|
+
Not implemented yet: ASS export with styling.
|
|
50
|
+
|
|
51
|
+
## Getting started
|
|
52
|
+
|
|
53
|
+
The panel has a **Usage** button at the bottom that opens the same walkthrough; for a
|
|
54
|
+
first run:
|
|
55
|
+
|
|
56
|
+
1. **Install the runtime** (once): ffmpeg, Python and PyTorch, about 3 GB. CUDA is used
|
|
57
|
+
automatically when an NVIDIA GPU is present, otherwise CPU. Optionally download the
|
|
58
|
+
Whisper model at the same time (about 1.6 GB).
|
|
59
|
+
2. **Transcribe**: pick a video or audio file and start. The task card shows progress and
|
|
60
|
+
can be cancelled; the project appears in the list when done.
|
|
61
|
+
3. **Translate**: open the project, pick a model, then **Translate this batch** or
|
|
62
|
+
**Translate all remaining**. Tick **Also proofread the Japanese** to correct ASR
|
|
63
|
+
errors first.
|
|
64
|
+
4. **Review**: **Edit cues** changes Japanese or Chinese text, splits and merges cues, nudges
|
|
65
|
+
timing by 0.1 s and deletes lines you do not want; notes attached to a cue or a batch
|
|
66
|
+
are re-applied with **Save notes and retranslate**.
|
|
67
|
+
5. **Export**: **Export subtitles** writes a `.srt` named after the video.
|
|
68
|
+
|
|
69
|
+
**Background and glossary** in the same dialog carries tags and a note into every
|
|
70
|
+
translation prompt — names, works and tone belong there. The glossary imports pasted CSV
|
|
71
|
+
and exports the same format.
|
|
72
|
+
|
|
73
|
+
### Notes
|
|
74
|
+
|
|
75
|
+
- Windows only, DSH 0.2.1 or newer;
|
|
76
|
+
- transcription runs locally; translation sends only the selected subtitle text to the
|
|
77
|
+
model service you chose in DSH;
|
|
78
|
+
- the plugin stores no API keys — DSH owns the credentials;
|
|
79
|
+
- projects default to `Documents\\DshSubtitle\\projects` and can be changed or opened from
|
|
80
|
+
the panel;
|
|
81
|
+
- hour-long videos take a while to transcribe; transcribe first, then translate in batches;
|
|
82
|
+
- deleting a project offers "remove from list" or "delete the local files"; the second
|
|
83
|
+
cannot be undone.
|
|
41
84
|
|
|
42
85
|
## Installation
|
|
43
86
|
|
|
@@ -69,7 +112,7 @@ provides a settings section and a right-sidebar tab. From top to bottom:
|
|
|
69
112
|
migration, and the download sources with their measured speed (re-probe on demand).
|
|
70
113
|
- **Transcribe**: media path with a **Browse** button, then start.
|
|
71
114
|
- **Tasks**: progress bar, phase, log tail, and a **Cancel** button while running.
|
|
72
|
-
- **Projects**: pin, show
|
|
115
|
+
- **Projects**: pin, show removed, change or open the projects folder, delete (reference only or with the local files). Opening
|
|
73
116
|
a project shows a dialog for SRT export, `cues.json` import, cue editing and preview.
|
|
74
117
|
|
|
75
118
|
## Agent tools
|
|
@@ -81,6 +124,8 @@ provides a settings section and a right-sidebar tab. From top to bottom:
|
|
|
81
124
|
| `subtitle_transcribe` | transcribe a video or audio file into `asr.json` |
|
|
82
125
|
| `subtitle_job` | job progress and result (`waitSeconds` blocks) |
|
|
83
126
|
| `subtitle_export` | build the bilingual SRT from `asr.json` and cue files (coverage validated) |
|
|
127
|
+
| `subtitle_review` | batch review: take a batch, apply the returned lines, validate coverage and glossary ([docs/REVIEW.md](docs/REVIEW.md)) |
|
|
128
|
+
| `subtitle_glossary` | glossary: show, export to CSV, import and merge from a file or an online URL |
|
|
84
129
|
|
|
85
130
|
## Data and routes
|
|
86
131
|
|
|
@@ -133,8 +178,10 @@ installation. A migration leaves a pointer to the new location at
|
|
|
133
178
|
- **Segment timestamps**: `return_timestamps="word"` raises `IndexError` with
|
|
134
179
|
transformers 5.x and this model, so each fragment has a start and end but no per-word
|
|
135
180
|
timing.
|
|
136
|
-
- **
|
|
137
|
-
|
|
181
|
+
- **Translation uses the configured model**: the plugin calls the DSH model service, so no extra
|
|
182
|
+
API key is needed; a manual paste path remains when no model is available.
|
|
183
|
+
- **Panel language**: the panel ships in Simplified Chinese only; the plugin entry title and
|
|
184
|
+
description are translated (English and Chinese).
|
|
138
185
|
- The first install downloads about 3 GB (the CUDA build and the model) and needs a stable
|
|
139
186
|
network.
|
|
140
187
|
|
package/README.ja.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-ai-subtitle)
|
|
8
8
|
[](https://nodejs.org/)
|
|
9
9
|
|
|
10
|
-
<!-- translated-from: README.md sha256:
|
|
10
|
+
<!-- translated-from: README.md sha256:18d65a239037 -->
|
|
11
11
|
|
|
12
12
|
DeepSeek Harness(DSH)の字幕プラグインです。日本語動画を日中バイリンガルの SRT に変換します。必要なランタイム(ffmpeg、CPython、PyTorch、transformers)は指定ディレクトリにすべて導入されるため、Python・ffmpeg・モデルを事前に用意する必要はありません。
|
|
13
13
|
|
|
@@ -25,9 +25,36 @@ DeepSeek Harness(DSH)の字幕プラグインです。日本語動画を日
|
|
|
25
25
|
- **プロジェクト管理**:ピン留め、非表示、参照のみ削除・ローカルファイルごと削除の 2 種類。
|
|
26
26
|
- **キュー編集**:日本語と中国語のテキスト編集、分割、次のキューとの結合、開始・終了時刻の 0.1 秒調整、自動時刻への復元。
|
|
27
27
|
- **SRT 出力**:UTF-8 BOM と CRLF、出力前にフラグメント被覆を検証します。
|
|
28
|
+
- **自動翻訳**:DSH に設定済みのモデルへバッチ単位で送信し、用語集とあなたの意見を添えます。モデルが使えない場合は手動貼り付けも可能です。
|
|
29
|
+
- **背景と用語**:プロジェクト単位のタグと説明を毎回の翻訳プロンプトに含めます。用語集は CSV で入出力でき、聞き間違いの修正にも対応します。
|
|
30
|
+
- **日本語の校正**:翻訳前に認識誤り(同音異義語・抜け・句切り)を校正でき、変更件数を報告します。
|
|
31
|
+
- **プロジェクトフォルダー**:既定は「ドキュメント」配下。変更と既存プロジェクトの移行ができ、エクスプローラーで開けます。
|
|
32
|
+
- **最近使った項目**:メディア選択時に最近のファイルとフォルダーを展開できます。
|
|
33
|
+
- **行の削除**:不要な行は削除(内部的にはスキップ)でき、カバレッジと書き出しに影響しません。
|
|
28
34
|
- **ファイル参照**:内蔵ブラウザ。クイック位置を備え、前回のディレクトリを記憶します。
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
未実装:ASS 出力(スタイル付き字幕)。
|
|
37
|
+
|
|
38
|
+
## 使い方
|
|
39
|
+
|
|
40
|
+
パネル下部の「使用説明」から同じ流れを開けます。初回は次の順番で:
|
|
41
|
+
|
|
42
|
+
1. **ランタイムをインストール**(一度だけ):ffmpeg、Python、PyTorch を約 3 GB ダウンロード。NVIDIA GPU があれば CUDA、なければ CPU。Whisper モデル(約 1.6 GB)を同時に落とすこともできます。
|
|
43
|
+
2. **文字起こし**:動画または音声を選んで開始。タスクカードに進捗が出て、キャンセルも可能。完了するとプロジェクトが一覧に追加されます。
|
|
44
|
+
3. **翻訳**:プロジェクトを開き、モデルを選んで「このバッチを翻訳」または「残りをすべて翻訳」。認識ミスも直すなら「日本語の認識も校正」にチェック。
|
|
45
|
+
4. **校正・編集**:「行ごとに編集」で日本語・中国語の修正、分割・結合、0.1 秒単位の時間調整、不要な行の削除ができます。各行やバッチへの意見は「意見を保存して再翻訳」で反映されます。
|
|
46
|
+
5. **書き出し**:「字幕を書き出し」で動画と同名の `.srt` ができます。
|
|
47
|
+
|
|
48
|
+
「背景と用語」のタグと説明は毎回の翻訳プロンプトに含まれます。人名・作品名・番組の雰囲気はここに書いてください。用語集は CSV の貼り付け取り込みと書き出しに対応しています。
|
|
49
|
+
|
|
50
|
+
### 注意
|
|
51
|
+
|
|
52
|
+
- Windows のみ、DSH 0.2.1 以上;
|
|
53
|
+
- 文字起こしはローカルで実行されます。翻訳は選んだ字幕テキストだけを DSH で設定したモデルサービスへ送ります;
|
|
54
|
+
- API key は保存しません(認証情報は DSH が管理);
|
|
55
|
+
- プロジェクトは既定で「ドキュメント\\DshSubtitle\\projects」。パネルから変更・オープンできます;
|
|
56
|
+
- 数時間の動画は時間がかかるため、先に文字起こしを済ませてから分割して翻訳するのがおすすめです;
|
|
57
|
+
- プロジェクト削除は「一覧から外す」と「ローカルファイルも削除」を選べます。後者は元に戻せません。
|
|
31
58
|
|
|
32
59
|
## 導入
|
|
33
60
|
|
|
@@ -65,6 +92,8 @@ DSH のメインパネルと左ナビゲーションの項目として登録さ
|
|
|
65
92
|
| `subtitle_transcribe` | 動画または音声を `asr.json` に書き出す |
|
|
66
93
|
| `subtitle_job` | タスクの進捗と結果(`waitSeconds` で待機) |
|
|
67
94
|
| `subtitle_export` | `asr.json` とキュー定義から SRT を出力(被覆を検証) |
|
|
95
|
+
| `subtitle_review` | バッチ校正:バッチ取得、返却行の反映、被覆と用語の検証([docs/REVIEW.md](docs/REVIEW.md)) |
|
|
96
|
+
| `subtitle_glossary` | 用語集:表示、CSV 出力、ファイルまたはオンライン URL から取り込み・統合 |
|
|
68
97
|
|
|
69
98
|
## データと API
|
|
70
99
|
|
|
@@ -104,7 +133,9 @@ DSH のメインパネルと左ナビゲーションの項目として登録さ
|
|
|
104
133
|
|
|
105
134
|
- **Windows のみ**:ffmpeg のパッケージとパス処理は Windows を前提としています。
|
|
106
135
|
- **区間単位の時刻**:transformers 5.x と kotoba-whisper の `return_timestamps="word"` は `IndexError` を送出するため、フラグメントごとの開始・終了時刻のみで、単語単位の時刻はありません。
|
|
107
|
-
-
|
|
136
|
+
- **翻訳は設定済みモデルに依存**:DSH のモデルサービスを呼ぶため API key の追加設定は不要です。
|
|
137
|
+
モデルが使えない場合は手動貼り付けに切り替えられます。
|
|
138
|
+
- **パネルの言語**:パネルは簡体字中国語のみです。プラグイン入口のタイトルと説明は英語・中国語の二言語です。
|
|
108
139
|
- 初回導入は約 3 GB(CUDA 版 PyTorch とモデル)で、安定した回線が必要です。
|
|
109
140
|
|
|
110
141
|
## 開発
|
package/README.ko.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-ai-subtitle)
|
|
8
8
|
[](https://nodejs.org/)
|
|
9
9
|
|
|
10
|
-
<!-- translated-from: README.md sha256:
|
|
10
|
+
<!-- translated-from: README.md sha256:18d65a239037 -->
|
|
11
11
|
|
|
12
12
|
DeepSeek Harness(DSH)용 자막 플러그인으로, 일본어 영상을 일중 이중 언어 SRT로 변환합니다. 필요한 런타임(ffmpeg, CPython, PyTorch, transformers)은 지정한 디렉터리에 모두 설치되므로 Python, ffmpeg, 모델을 미리 준비할 필요가 없습니다.
|
|
13
13
|
|
|
@@ -25,9 +25,36 @@ DeepSeek Harness(DSH)용 자막 플러그인으로, 일본어 영상을 일중
|
|
|
25
25
|
- **프로젝트 관리**: 고정, 숨김, 참조만 삭제 또는 로컬 파일까지 삭제의 두 가지 방식.
|
|
26
26
|
- **큐 편집**: 일본어와 중국어 텍스트 수정, 분할, 다음 큐와 병합, 시작·종료 시각을 0.1초 단위로 조정, 자동 시각 복원.
|
|
27
27
|
- **SRT 내보내기**: UTF-8 BOM과 CRLF를 사용하며, 내보내기 전에 프래그먼트 커버리지를 검증합니다.
|
|
28
|
+
- **자동 번역**: DSH에 설정된 모델로 배치를 보내며 용어집과 사용자 의견을 함께 전달합니다. 모델을 쓸 수 없으면 수동 붙여넣기도 가능합니다.
|
|
29
|
+
- **배경과 용어**: 프로젝트 단위 태그와 설명이 매번 번역 프롬프트에 포함됩니다. 용어집은 CSV로 가져오기/내보내기가 가능하며 잘못 들은 이름도 수정합니다.
|
|
30
|
+
- **일본어 교정**: 번역 전에 인식 오류(동음어, 누락, 끊어 읽기)를 교정하고 변경된 줄 수를 보고합니다.
|
|
31
|
+
- **프로젝트 폴더**: 기본은 "문서" 폴더이며 변경과 기존 프로젝트 이동을 지원하고 탐색기에서 열 수 있습니다.
|
|
32
|
+
- **최근 사용**: 미디어 선택 시 최근 파일과 폴더를 펼쳐 볼 수 있습니다.
|
|
33
|
+
- **줄 삭제**: 필요 없는 줄을 삭제(내부적으로 건너뛰기)해도 커버리지와 내보내기에 영향이 없습니다.
|
|
28
34
|
- **파일 찾아보기**: 내장 브라우저로 빠른 위치를 제공하고 마지막 디렉터리를 기억합니다.
|
|
29
35
|
|
|
30
|
-
미구현:
|
|
36
|
+
미구현: ASS 내보내기(스타일 자막).
|
|
37
|
+
|
|
38
|
+
## 사용 방법
|
|
39
|
+
|
|
40
|
+
패널 하단의 「사용 설명」에서 같은 안내를 열 수 있습니다. 처음 사용하는 순서:
|
|
41
|
+
|
|
42
|
+
1. **런타임 설치**(한 번만): ffmpeg, Python, PyTorch 약 3 GB를 내려받습니다. NVIDIA GPU가 있으면 CUDA, 없으면 CPU. Whisper 모델(약 1.6 GB)을 함께 받을 수도 있습니다.
|
|
43
|
+
2. **전사**: 영상이나 음성을 선택해 시작합니다. 작업 카드에 진행률이 보이고 취소할 수 있으며, 끝나면 프로젝트가 목록에 추가됩니다.
|
|
44
|
+
3. **번역**: 프로젝트를 열고 모델을 고른 뒤 「이 배치 번역」 또는 「남은 배치 모두 번역」. 인식 오류도 고치려면 「일본어 인식도 교정」을 선택합니다.
|
|
45
|
+
4. **교정/수정**: 「줄별 수정」에서 일본어·중국어 수정, 분할·병합, 0.1초 단위 시간 조정, 불필요한 줄 삭제가 가능합니다. 줄이나 배치에 의견을 남기고 「의견 저장 후 재번역」을 누르면 반영됩니다.
|
|
46
|
+
5. **내보내기**: 「자막 내보내기」로 영상과 같은 이름의 `.srt`를 만듭니다.
|
|
47
|
+
|
|
48
|
+
「배경과 용어」의 태그와 설명은 매번 번역 프롬프트에 포함됩니다. 인명·작품명·프로그램 분위기는 여기에 적으세요. 용어집은 CSV 붙여넣기 가져오기와 내보내기를 지원합니다.
|
|
49
|
+
|
|
50
|
+
### 주의
|
|
51
|
+
|
|
52
|
+
- Windows 전용, DSH 0.2.1 이상;
|
|
53
|
+
- 전사는 로컬에서 실행됩니다. 번역은 선택한 자막 텍스트만 DSH에 설정된 모델 서비스로 보냅니다;
|
|
54
|
+
- API key를 저장하지 않습니다(자격 증명은 DSH가 관리);
|
|
55
|
+
- 프로젝트 기본 위치는 「문서\\DshSubtitle\\projects」이며 패널에서 변경하거나 열 수 있습니다;
|
|
56
|
+
- 몇 시간짜리 영상은 전사에 시간이 걸리므로 먼저 전사한 뒤 여러 배치로 나눠 번역하는 편이 좋습니다;
|
|
57
|
+
- 프로젝트 삭제 시 「목록에서 제거」와 「로컬 파일까지 삭제」를 고를 수 있으며 후자는 되돌릴 수 없습니다.
|
|
31
58
|
|
|
32
59
|
## 설치
|
|
33
60
|
|
|
@@ -65,6 +92,8 @@ DSH의 메인 패널과 왼쪽 내비게이션 항목으로 등록되며, 설정
|
|
|
65
92
|
| `subtitle_transcribe` | 영상 또는 오디오를 `asr.json`으로 전사 |
|
|
66
93
|
| `subtitle_job` | 작업 진행률과 결과(`waitSeconds`로 대기) |
|
|
67
94
|
| `subtitle_export` | `asr.json`과 큐 파일로 SRT 내보내기(커버리지 검증) |
|
|
95
|
+
| `subtitle_review` | 배치 교정: 배치 가져오기, 반환된 줄 반영, 커버리지·용어 검증([docs/REVIEW.md](docs/REVIEW.md)) |
|
|
96
|
+
| `subtitle_glossary` | 용어집: 조회, CSV 내보내기, 파일 또는 온라인 URL에서 가져와 병합 |
|
|
68
97
|
|
|
69
98
|
## 데이터와 API
|
|
70
99
|
|
|
@@ -104,7 +133,9 @@ DSH의 메인 패널과 왼쪽 내비게이션 항목으로 등록되며, 설정
|
|
|
104
133
|
|
|
105
134
|
- **Windows 전용**: ffmpeg 패키지와 경로 처리가 Windows를 전제로 합니다.
|
|
106
135
|
- **구간 단위 시각**: transformers 5.x와 kotoba-whisper의 `return_timestamps="word"`는 `IndexError`를 발생시키므로 프래그먼트마다 시작·종료 시각만 있고 단어 단위 시각은 없습니다.
|
|
107
|
-
-
|
|
136
|
+
- **번역은 설정된 모델 사용**: DSH 모델 서비스를 호출하므로 추가 API key가 필요 없습니다.
|
|
137
|
+
모델을 쓸 수 없으면 수동 붙여넣기로 전환할 수 있습니다.
|
|
138
|
+
- **패널 언어**: 패널은 현재 중국어 간체만 지원합니다. 플러그인 진입점의 제목과 설명은 영어/중국어 두 가지입니다.
|
|
108
139
|
- 첫 설치에 약 3 GB(CUDA 빌드와 모델)를 내려받으며 안정적인 회선이 필요합니다.
|
|
109
140
|
|
|
110
141
|
## 개발
|
package/README.md
CHANGED
|
@@ -23,9 +23,36 @@ DeepSeek Harness(DSH)的字幕插件,把日语视频转成中日双语 SRT
|
|
|
23
23
|
- **项目管理**:置顶、隐藏;删除时可选仅移除引用或连同本地文件删除。
|
|
24
24
|
- **cue 编辑**:修改日文与中文、拆分、与下一条合并、起止时间按 0.1 秒调整、恢复自动时间。
|
|
25
25
|
- **SRT 导出**:UTF-8 BOM 与 CRLF 行尾,导出前校验碎片覆盖率。
|
|
26
|
+
- **自动翻译**:按批调用 DSH 已配置的模型,带上术语表与你的意见;模型不可用时仍可手动粘贴译文。
|
|
27
|
+
- **背景与术语**:项目级标签与说明会随每次翻译进入提示词;术语表可导入导出 CSV,并支持误听修正。
|
|
28
|
+
- **校对日文**:翻译前可选校正识别错误(同音字、漏字、断句),并报告改动了多少条。
|
|
29
|
+
- **项目目录**:默认在「文档」下,可自定义并迁移现有项目;可一键在资源管理器中打开。
|
|
30
|
+
- **最近使用**:浏览媒体时可展开最近用过的文件与文件夹。
|
|
31
|
+
- **逐条删除**:不需要的行直接删除(内部记为跳过段),不影响覆盖率与导出。
|
|
26
32
|
- **文件浏览**:内置文件浏览器,提供快捷位置并记住上次访问的目录。
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
尚未实现:ASS 导出(带样式的字幕)。
|
|
35
|
+
|
|
36
|
+
## 使用流程
|
|
37
|
+
|
|
38
|
+
面板底部有「使用说明」,点开是同样的一段流程;这里给第一次使用的人:
|
|
39
|
+
|
|
40
|
+
1. **安装运行时**(只做一次):点「安装运行时」,下载 ffmpeg、Python、PyTorch(约 3 GB)。有 NVIDIA 显卡自动用 CUDA,没有则用 CPU;可以勾选同时下载 Whisper 模型(约 1.6 GB)。
|
|
41
|
+
2. **转写**:选择视频或音频,点开始。任务卡显示进度、可取消;完成后项目进入列表。
|
|
42
|
+
3. **翻译**:打开项目 → 选模型 → 「自动翻译本批」或「自动翻译全部剩余」。想同时修正识别错误,勾选「同时校正日文识别」。
|
|
43
|
+
4. **校对与修改**:「逐条修改」可改日文/中文、拆分合并、按 0.1 秒微调时间、删除不需要的行;给某条或整批写意见后「保存意见并重译本批」。
|
|
44
|
+
5. **导出**:点「导出字幕」,得到与视频同名的 `.srt`。
|
|
45
|
+
|
|
46
|
+
「背景与术语」里的标签和说明会随每次翻译交给模型,适合写人名、作品名和节目风格;术语表支持粘贴 CSV 导入,也可以导出。
|
|
47
|
+
|
|
48
|
+
### 注意事项
|
|
49
|
+
|
|
50
|
+
- 仅支持 Windows,需要 DSH 0.2.1 及以上;
|
|
51
|
+
- 转写在本机完成;翻译只把你选中的字幕文本发给你在 DSH 里选择的模型服务;
|
|
52
|
+
- 插件不保存 API key,模型凭证由 DSH 管理;
|
|
53
|
+
- 项目默认在「文档\\DshSubtitle\\projects」,可在面板里更改或直接打开;
|
|
54
|
+
- 数小时的视频转写较慢,建议先转写完再分几批翻译;
|
|
55
|
+
- 删除项目时可选「仅从列表移除」或「连本地文件一起删除」,后者不可撤销。
|
|
29
56
|
|
|
30
57
|
## 安装
|
|
31
58
|
|
|
@@ -50,7 +77,7 @@ dsh plugin --profile <profile> add link:/path/to/dsh-ai-subtitle
|
|
|
50
77
|
- **运行时**(默认折叠):安装与修复、是否同时下载模型、整体迁移、下载源及其测得速率(可重新测速)。
|
|
51
78
|
- **转写**:媒体路径与「浏览」按钮,随后开始转写。
|
|
52
79
|
- **任务**:进度条、阶段、日志尾部;运行中的任务右侧有「取消」。
|
|
53
|
-
-
|
|
80
|
+
- **项目**:置顶、显示已移除、删除(仅移除引用或连本地文件一起删除),可更改或打开项目目录;打开项目后可在弹窗中自动翻译、逐条修改(含删除)、导出字幕。
|
|
54
81
|
|
|
55
82
|
## Agent 工具
|
|
56
83
|
|
|
@@ -61,6 +88,8 @@ dsh plugin --profile <profile> add link:/path/to/dsh-ai-subtitle
|
|
|
61
88
|
| `subtitle_transcribe` | 转写视频或音频,产出 `asr.json` |
|
|
62
89
|
| `subtitle_job` | 查询任务进度与结果(`waitSeconds` 可阻塞等待) |
|
|
63
90
|
| `subtitle_export` | 由 `asr.json` 与 cue 文件导出双语 SRT(校验覆盖率) |
|
|
91
|
+
| `subtitle_review` | 分批校对:取批次、回填译文、校验覆盖率与术语(见 [docs/REVIEW.md](docs/REVIEW.md)) |
|
|
92
|
+
| `subtitle_glossary` | 术语表:查看、导出为 CSV、从文件或在线链接导入并合并 |
|
|
64
93
|
|
|
65
94
|
## 数据与接口
|
|
66
95
|
|
|
@@ -100,7 +129,8 @@ dsh plugin --profile <profile> add link:/path/to/dsh-ai-subtitle
|
|
|
100
129
|
|
|
101
130
|
- **仅 Windows**:ffmpeg 静态包与路径处理按 Windows 实现。
|
|
102
131
|
- **段级时间戳**:transformers 5.x 与 kotoba-whisper 的 `return_timestamps="word"` 会抛出 `IndexError`,因此每条碎片只有起止时间,没有逐词时间。
|
|
103
|
-
-
|
|
132
|
+
- **翻译依赖已配置的模型**:插件通过 DSH 的模型服务自动翻译,不需要另外配置 API key;模型不可用时仍可手动粘贴。
|
|
133
|
+
- **界面语言**:面板目前只有简体中文;插件入口的标题与说明提供中英两版。
|
|
104
134
|
- 首次安装约 3 GB(CUDA 版 PyTorch 与模型),需要稳定网络。
|
|
105
135
|
|
|
106
136
|
## 开发
|