Skip to content

Commit 97ad9a4

Browse files
committed
release: merge v1.8.11 — sanitizer round-2 + #287 + #271 + #291 fixes
2 parents eafa75f + 793d305 commit 97ad9a4

176 files changed

Lines changed: 4536 additions & 83 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ output/
8585
*.mkv
8686
*.srt
8787
!examples/*.srt
88+
!tests/fixtures/**/*.srt
8889
.tmp/
8990
raw_subs/
91+
!tests/fixtures/**/raw_subs/
9092

9193
# Installer binaries
9294
installer/*.exe

docs/ISSUE_TRACKER_v1.8.x.md

Lines changed: 121 additions & 49 deletions
Large diffs are not rendered by default.

installer/RELEASE_NOTES_v1.8.11.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
**Sanitizer hardening + small fixes**
2+
The Japanese SRT sanitizer is more robust. Two smaller issues with Colab
3+
install and Ollama translation are also fixed.
4+
5+
---
6+
7+
8+
Subtitle Sanitization
9+
10+
- Hardening of the Japanese SRT sanitization. (#287)
11+
12+
13+
Ollama
14+
15+
- **Curated model list + output length control** — one model in the
16+
curated list emitted chain-of-thought text that broke the translation
17+
format; replaced with an instruct-tuned equivalent. Also added
18+
`--ollama-max-tokens` so output length can be tuned for setups that
19+
need a different default. (#271)
20+
21+
22+
Colab
23+
24+
- **`--provider local` translation on Colab** — the `[llm]` extra was
25+
missing from `install_colab.sh`, causing
26+
`ModuleNotFoundError: starlette_context` when starting local LLM
27+
translation. The extra is now installed. (#291)
28+
29+
---
30+
31+
### How to Upgrade or Install
32+
33+
**Upgrade from 1.8.10:**
34+
35+
```
36+
pip install -U --no-deps "whisperjav @ git+https://github.com/meizhong986/whisperjav.git@v1.8.11"
37+
```
38+
39+
**Fresh Install:**
40+
41+
### Windows — Standalone Installer (.exe)
42+
43+
44+
1. Download **WhisperJAV-1.8.11-Windows-x86_64.exe** from the Assets below
45+
2. Run the installer (no admin rights required)
46+
3. Wait 10-20 minutes for setup to complete
47+
4. Launch from the Desktop shortcut
48+
49+
Installs to `%LOCALAPPDATA%\WhisperJAV`. A desktop shortcut is created automatically. Your GPU is detected automatically.
50+
51+
### macOS
52+
53+
Requires [Git](https://git-scm.com/downloads). The install script checks for everything else (Xcode CLI Tools, Python, FFmpeg, PortAudio) and tells you exactly what to install if anything is missing. Open Terminal and run:
54+
55+
```bash
56+
cd ~
57+
git clone https://github.com/meizhong986/whisperjav.git
58+
cd whisperjav
59+
git checkout v1.8.11
60+
installer/install_mac.sh
61+
```
62+
63+
After installation, open the `whisperjav` folder in Finder and double-click **WhisperJAV.command** to launch the GUI.
64+
65+
### Linux
66+
67+
Requires Git and Python 3.10-3.12. The install script handles PEP 668 (externally-managed) environments on Debian 12+ / Ubuntu 24.04+. Open a terminal and run:
68+
69+
```bash
70+
cd ~
71+
git clone https://github.com/meizhong986/whisperjav.git
72+
cd whisperjav
73+
git checkout v1.8.11
74+
installer/install_linux.sh
75+
```
76+
77+
After installation, launch the GUI with `./WhisperJAV.sh`.
78+
79+
### Windows — Source Install
80+
81+
Requires [Git](https://git-scm.com/downloads) and [Python 3.10-3.12](https://www.python.org/downloads/). Open a terminal and run:
82+
83+
```
84+
cd %USERPROFILE%
85+
git clone https://github.com/meizhong986/whisperjav.git
86+
cd whisperjav
87+
git checkout v1.8.11
88+
installer\install_windows.bat
89+
```
90+
91+
After installation, double-click **WhisperJAV.bat** to launch the GUI.
92+
93+
94+
95+
96+
## Compatibility
97+
98+
Same as v1.8.10 — no dependency changes.
99+
100+
| Component | Supported Versions |
101+
|-----------|-------------------|
102+
| Python | 3.10, 3.11, 3.12 |
103+
| PyTorch | 2.4.0 - 2.10.x |
104+
| CUDA | 11.8+ (12.4+ recommended) |
105+
| Ollama | 0.3.0+ recommended |
106+
107+
## Known Issues
108+
109+
- **Windows standalone installer does not add its bundled tools to user PATH.**
110+
WhisperJAV ships its own ffmpeg 7.1 (pinned `>=6,<8`) inside the install
111+
directory's `Library\bin`, but the installer does not persistently add
112+
that folder to the user's PATH. If you have a separate ffmpeg on your
113+
PATH — especially ffmpeg 8.x — WhisperJAV subprocesses that run outside
114+
the GUI launcher may resolve to that other ffmpeg instead of the bundled
115+
one. Behavior can be unexpected if the third-party ffmpeg has different
116+
default flags or filter names. Workaround: launch via the Desktop
117+
shortcut (which activates the environment) or manually add
118+
`<install-dir>\Library\bin` to your user PATH. A proper fix is planned
119+
for v1.8.12.
120+
121+
- **Apple Silicon MPS + whisper-large-v3-turbo** — produces garbage output
122+
on MPS for this specific model. Use `--hf-device cpu` or the default
123+
kotoba model. (#198, #227)
124+
125+
- **Ollama download progress** — the download progress bar in the popup is
126+
indeterminate (pulsing). Real progress is shown in the terminal. A hint
127+
in the popup directs you to check there.
128+
129+
## What's Next
130+
131+
**v1.8.12** — installer PATH fix (above), a ZipEnhancer Colab init bug
132+
(#290), Qwen3-ASR `transformers` version pin (#280), and verification of
133+
the Colab fix in this release.
134+
135+
**v1.9.0** — full Ollama migration (remove llama-cpp-python), standalone
136+
subtitle merge CLI (#230), Chinese GUI partial i18n (#175, #180), speaker
137+
diarization (#248, #252).
138+
139+
---
140+
141+
Thanks to everyone who reported issues and tested on their own material.

installer/VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
[version]
77
major = 1
88
minor = 8
9-
patch = 10
9+
patch = 11
1010
# PEP 440 prerelease suffix for wheel/pip (a0, b0, rc0, .post1, or empty for stable)
11-
prerelease = .post3
11+
prerelease =
1212
# Human-readable label for display (alpha, beta, rc, hotfix1, or empty for clean version)
13-
display_label = hotfix3
13+
display_label =
1414
architecture = v4.4
1515

1616
[metadata]

installer/install_colab.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ info "This may take 1-3 minutes..."
173173
# --system: required since we're not in a venv
174174
# --no-build-isolation: not needed, uv handles this
175175
# Colab's torch/numpy/etc. are reused — only WhisperJAV's own deps are installed.
176-
if ! uv pip install --system "git+${WHISPERJAV_REPO}@${WHISPERJAV_BRANCH}#egg=whisperjav[cli,enhance,translate,huggingface,qwen,analysis,compatibility]"; then
176+
if ! uv pip install --system "git+${WHISPERJAV_REPO}@${WHISPERJAV_BRANCH}#egg=whisperjav[cli,enhance,translate,huggingface,qwen,analysis,compatibility,llm]"; then
177177
error "WhisperJAV installation failed"
178178
exit 1
179179
fi

notebook/WhisperJAV_colab_edition_expert.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"pass1_model = \"automatic\" #@param [\"automatic\", \"large-v2\", \"large-v3\", \"turbo\", \"kotoba-bilingual\", \"kotoba-v2.0\", \"kotoba-v2.1\", \"kotoba-v2.2\"]\n",
2929
"\n",
3030
"#@markdown **Expert Audio Setup**\n",
31-
"pass1_scene_detector = \"automatic\" #@param [\"automatic\", \"auditok\", \"silero\", \"semantic\"]\n",
32-
"pass1_speech_segmenter = \"automatic\" #@param [\"automatic\", \"silero\", \"ten\", \"none\"]\n",
31+
"pass1_scene_detector = \"semantic\" #@param [\"automatic\", \"auditok\", \"silero\", \"semantic\"]\n",
32+
"pass1_speech_segmenter = \"silero-v3.1\" #@param [\"automatic\", \"silero-v3.1\", \"ten\", \"none\"]\n",
3333
"pass1_speech_enhancer = \"none\" #@param [\"none\", \"ffmpeg-dsp\", \"clearvoice\", \"zipenhancer\", \"bs-roformer\"]\n",
3434
"#@markdown <font size=\"1\">auditok=energy (fast), silero=VAD, semantic=texture (complex audio) | enhancer: ffmpeg-dsp(no GPU), clearvoice(48k), bs-roformer(vocal)</font>\n",
3535
"\n",
@@ -51,8 +51,8 @@
5151
"pass2_model = \"automatic\" #@param [\"automatic\", \"large-v2\", \"large-v3\", \"turbo\", \"kotoba-bilingual\", \"kotoba-v2.0\", \"kotoba-v2.1\", \"kotoba-v2.2\"]\n",
5252
"\n",
5353
"#@markdown **Expert Audio Setup**\n",
54-
"pass2_scene_detector = \"automatic\" #@param [\"automatic\", \"auditok\", \"silero\", \"semantic\"]\n",
55-
"pass2_speech_segmenter = \"automatic\" #@param [\"automatic\", \"silero\", \"ten\", \"none\"]\n",
54+
"pass2_scene_detector = \"semantic\" #@param [\"automatic\", \"auditok\", \"silero\", \"semantic\"]\n",
55+
"pass2_speech_segmenter = \"silero-v3.1\" #@param [\"automatic\", \"silero-v3.1\", \"ten\", \"none\"]\n",
5656
"pass2_speech_enhancer = \"none\" #@param [\"none\", \"ffmpeg-dsp\", \"clearvoice\", \"zipenhancer\", \"bs-roformer\"]\n",
5757
"\n",
5858
"#@markdown **FFmpeg Filters** *(only if enhancer is ffmpeg-dsp)*\n",
@@ -706,4 +706,4 @@
706706
},
707707
"nbformat": 4,
708708
"nbformat_minor": 0
709-
}
709+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Diff script working output — not committed (regenerated each run)
2+
current_*/
3+
4+
# Round-2 verifier working output — regenerated each run
5+
round2_escapees/_run_output/
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Sanitizer Regression Corpus — Acceptance Matrix
2+
3+
> Contract document for v1.8.11 sanitizer fixes.
4+
> Baseline captured at HEAD: **e224333** (2026-04-18)
5+
> Plan reference: `docs/plans/V1811_SANITIZER_FIX_PLAN.md`
6+
7+
## Acceptance Categories
8+
9+
Every fixture must produce an output that falls into exactly one of these categories:
10+
11+
- **A. EXPECTED CHANGE** — output differs from baseline; the difference is an expected consequence of Fix 1, 2, 3, or 5a
12+
- **B. BYTE-IDENTICAL** — output is byte-identical to baseline
13+
- **C. EXPECTED DROP** — subtitle removed; artifact record shows a valid reason code (`hallucination`, `repetition`, `abnormally_fast_cps_*`, `abnormally_slow_cps_*`, `symbol_only_residue`)
14+
15+
Any output not fitting A/B/C blocks the v1.8.11 release.
16+
17+
---
18+
19+
## Fix 1 — `${N:0:M}` slice syntax
20+
21+
Durations are 0.5s so post-strip residues have CPS > 1.0 and survive the CPS filter.
22+
23+
| Fixture | Input | Baseline (pre-fix) | Expected (post-fix) | Category |
24+
|---|---|---|---|---|
25+
| 01_vowel_run_alone.srt | `いいいいいいいいいいいい` | (dropped — empty) | `いい` (kept) | **A** |
26+
| 02_vowel_run_with_punct.srt | `いいいいいいいいいいいい?` | `?` (kept — #287 symptom) | `いい?` (kept) | **A** |
27+
| 02b_vowel_run_with_period.srt | `うううううううううううう。` | `` | `うう。` | **A** |
28+
| 03_vocalization_hagh.srt | `はぁはぁはぁはぁはぁはぁはぁはぁはぁはぁ` | (dropped — empty) | `はぁ` (kept) | **A** |
29+
| 04_small_tsu_run.srt | `いっいっいっいっいっいっいっいっいっいっ` | (dropped — empty) | `いっ` (kept) | **A** |
30+
| 05_long_vowel_mark.srt | `〜〜〜〜〜〜〜〜〜〜〜〜` | (dropped — empty) | (dropped by Fix 2 — `〜〜〜` is symbol-only) | **C** |
31+
| 06_non_slice_replacement.srt | `こんにちは` | `こんにちは` | `こんにちは` | **B** |
32+
| 07_kana_in_context.srt | `わああうううううううううううう` | `わああ` | `わああうう` | **A** |
33+
34+
---
35+
36+
## Fix 2 — Symbol-only purge
37+
38+
| Fixture | Input | Baseline (pre-fix) | Expected (post-fix) | Category |
39+
|---|---|---|---|---|
40+
| 01_bang_only.srt | `!!` | (dropped — L135 `nonsensical`) | (dropped — `symbol_only_residue` if reaches Fix 2, or same reason as baseline) | **B** or **C** |
41+
| 02_question_only.srt | `???` | (dropped — L135) | (dropped) | **B** or **C** |
42+
| 03_ellipsis_only.srt | `……` | `……` (kept — L135 doesn't match ellipsis) | (dropped — `symbol_only_residue`) | **A** |
43+
| 04_music_notes_only.srt | `♪♫♩` | `♫♩` (kept — ♪ stripped by L268) | (dropped — `symbol_only_residue` after Fix 5a also strips ♫♩) | **A** |
44+
| 05_animal_emoji_only.srt | `🐈🐈🐈` | `🐈🐈🐈` (kept) | (dropped — `symbol_only_residue`) | **A** |
45+
| 06_fullwidth_punct_only.srt | `!!!` | (dropped) | (dropped) | **B** or **C** |
46+
| 07_whitespace_plus_punct.srt | ` !! ` | (dropped — L135) | (dropped) | **B** or **C** |
47+
| 08_mixed_kana_and_punct.srt | `こんにちは!!` | (dropped — `こんにちは` in filter list, `!!` stripped) | (dropped — same) | **B** |
48+
| 09_kanji_only.srt | `` | `` (kept — has kanji) | `` (kept) | **B** |
49+
| 10_fullwidth_alnum.srt | `hello` | `hello` (kept) | `hello` (kept) | **B** |
50+
| 11_fix1_residue_kana_plus_q.srt | `いいいいいいいいいいいい?` | `?` (bug residue) | `いい?` (Fix 1 keeps kana; Fix 2 keeps — has kana) | **A** |
51+
52+
Notes:
53+
- For cases where baseline already drops via a different path, post-fix may either (a) drop via the same path (B) or (b) drop via `symbol_only_residue` if control flow changes slightly (C). Either is acceptable provided the final outcome matches.
54+
55+
---
56+
57+
## Fix 3 — CPS newline exclusion
58+
59+
| Fixture | Input | Baseline text_len | Post-fix text_len | Expected post-fix | Category |
60+
|---|---|---|---|---|---|
61+
| 01_multiline_normal.srt | `こんにちは\n今日は` @ 2s | 9 (incl. `\n`) | 8 | kept (both CPS in safe range) | **B** |
62+
| 02_multiline_fast.srt | `はい\nはい\nはい` @ 0.1s | 8 (incl. 2x`\n`) | 6 | dropped (both: CPS > 30) | **B** |
63+
| 03_multiline_slow_short.srt | `あ\nい\nう\nえ` @ 10s | 7 | 4 | **dropped (new behavior)** — slow CPS + len ≤ 4 | **A** |
64+
| 04_single_line_baseline.srt | `あいう` @ 1s | 3 | 3 | kept (no newlines) | **B** |
65+
66+
---
67+
68+
## Fix 5a — SDH patterns
69+
70+
| Fixture | Input | Baseline | Expected post-fix | Category |
71+
|---|---|---|---|---|
72+
| 01_tortoise_shell.srt | `〔効果音〕こんにちは` | `〔効果音〕こんにちは` (unchanged — no pattern for 〔〕) | `こんにちは` | **A** |
73+
| 02_new_music_symbols.srt | `♫♩♬🎵🎶こんにちは` | `♫♩♬🎵🎶こんにちは` (unchanged — ♫♩♬🎵🎶 not in current L268) | `こんにちは` | **A** |
74+
| 03_sdh_bgm.srt | `[BGM]おはよう` | `[BGM]おはよう` (unchanged — specific `[音楽]` only) | `おはよう` | **A** |
75+
| 04_sdh_breathing.srt | `(喘息)` | (dropped — L65 strips halfwidth parens) | (dropped — same via L65 or new pattern) | **B** |
76+
| 05_sdh_noise.srt | `【ノイズ】` | (dropped — L86 strips fullwidth square) | (dropped — same) | **B** |
77+
| 06_regression_existing_music_symbol.srt | `♪★こんにちは` | `こんにちは` (♪ and ★ stripped by L268) | `こんにちは` (unchanged) | **B** |
78+
79+
---
80+
81+
## Combined fixtures
82+
83+
### `01_all_four_fixes_together.srt`
84+
85+
Exercises all four fixes in one SRT. Expected post-fix output:
86+
87+
| Block | Input | Expected |
88+
|---|---|---|
89+
| 1 | `いいいいいいいいいいいい?` @ 0.5s | `いい?` (Fix 1 produces residue, Fix 2 keeps) |
90+
| 2 | `!!` @ 2s | dropped |
91+
| 3 | `あ\nい\nう\nえ` @ 10s | dropped (Fix 3: text_len=4, CPS=0.4) |
92+
| 4 | `〔効果音〕おはよう` @ 3s | `おはよう` (Fix 5a strips tortoise shell) |
93+
| 5 | `こんにちは` @ 3s | dropped (filter list hit — pre-existing) |
94+
95+
Final SRT should contain subs 1 and 4 only (renumbered 1 and 2).
96+
97+
### `02_negative_control_all_legitimate.srt`
98+
99+
**Criterion**: post-fix output must be **BYTE-IDENTICAL to baseline**.
100+
101+
Note: baseline already drops 6 of 22 subs due to filter-list inclusions (pre-existing behavior, not in scope for v1.8.11). The remaining 16 kept subs must stay kept.
102+
103+
Pre-existing drops (informational only — not our fixes' concern):
104+
- `こんにちは`, `すみません`, `そうですね`, `気持ちいい`, `お母さん`, and one more (indexes 1, 4, 7, 8, 13 per baseline audit).
105+
106+
Any NEW drop introduced by Fix 1/2/3/5a is a false positive and blocks release.
107+
108+
---
109+
110+
## Verification Protocol (Phase 6)
111+
112+
1. Run `python tests/fixtures/sanitizer_regression/generate_synthetic.py` — regenerates fixtures (idempotent).
113+
2. Run `python tests/fixtures/sanitizer_regression/capture_baseline.py` — captures current-state output. Named after current HEAD SHA.
114+
3. After each code fix, re-run step 2 — creates new baseline directory.
115+
4. Diff the post-fix baseline against `baseline_e224333/` directory:
116+
- For every fixture, classify diff as A / B / C per this document.
117+
- Any fixture output not classifiable blocks the release.
118+
5. Archive diffs as evidence in plan document appendix.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Baseline captured at HEAD: e224333
2+
Total fixtures: 31
3+
Successful: 31
4+
Errors: 0
5+
6+
--- Successful captures ---
7+
combined/01_all_four_fixes_together.srt: 0 -> 0
8+
combined/02_negative_control_all_legitimate.srt: 0 -> 0
9+
fix1_slice_syntax/01_vowel_run_alone.srt: 0 -> 0
10+
fix1_slice_syntax/02_vowel_run_with_punct.srt: 0 -> 0
11+
fix1_slice_syntax/02b_vowel_run_with_period.srt: 0 -> 0
12+
fix1_slice_syntax/03_vocalization_hagh.srt: 0 -> 0
13+
fix1_slice_syntax/04_small_tsu_run.srt: 0 -> 0
14+
fix1_slice_syntax/05_long_vowel_mark.srt: 0 -> 0
15+
fix1_slice_syntax/06_non_slice_replacement.srt: 0 -> 0
16+
fix1_slice_syntax/07_kana_in_context.srt: 0 -> 0
17+
fix2_symbol_purge/01_bang_only.srt: 0 -> 0
18+
fix2_symbol_purge/02_question_only.srt: 0 -> 0
19+
fix2_symbol_purge/03_ellipsis_only.srt: 0 -> 0
20+
fix2_symbol_purge/04_music_notes_only.srt: 0 -> 0
21+
fix2_symbol_purge/05_animal_emoji_only.srt: 0 -> 0
22+
fix2_symbol_purge/06_fullwidth_punct_only.srt: 0 -> 0
23+
fix2_symbol_purge/07_whitespace_plus_punct.srt: 0 -> 0
24+
fix2_symbol_purge/08_mixed_kana_and_punct.srt: 0 -> 0
25+
fix2_symbol_purge/09_kanji_only.srt: 0 -> 0
26+
fix2_symbol_purge/10_fullwidth_alnum.srt: 0 -> 0
27+
fix2_symbol_purge/11_fix1_residue_kana_plus_q.srt: 0 -> 0
28+
fix3_newline_cps/01_multiline_normal.srt: 0 -> 0
29+
fix3_newline_cps/02_multiline_fast.srt: 0 -> 0
30+
fix3_newline_cps/03_multiline_slow_short.srt: 0 -> 0
31+
fix3_newline_cps/04_single_line_baseline.srt: 0 -> 0
32+
fix5a_sdh/01_tortoise_shell.srt: 0 -> 0
33+
fix5a_sdh/02_new_music_symbols.srt: 0 -> 0
34+
fix5a_sdh/03_sdh_bgm.srt: 0 -> 0
35+
fix5a_sdh/04_sdh_breathing.srt: 0 -> 0
36+
fix5a_sdh/05_sdh_noise.srt: 0 -> 0
37+
fix5a_sdh/06_regression_existing_music_symbol.srt: 0 -> 0
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
1
2+
00:00:00,200 --> 00:00:00,500
3+
?
4+
5+
2
6+
00:00:18,000 --> 00:00:19,000
7+
8+
9+
10+
11+
12+
3
13+
00:00:20,000 --> 00:00:23,000
14+
〔効果音〕おはよう
15+

0 commit comments

Comments
 (0)