Luigi commited on
Commit
9ce065b
·
verified ·
1 Parent(s): 831e481

remove superseded BreezyVoice-era script

Browse files
Files changed (1) hide show
  1. scripts/run_v4zh_v2.sh +0 -54
scripts/run_v4zh_v2.sh DELETED
@@ -1,54 +0,0 @@
1
- #!/usr/bin/env bash
2
- # v4zh-v2: retrain on DIVERSITY-EXPANDED corpus (existing 9042 + ~6500 broad-char Tatoeba/zh-TW).
3
- # Tests the data-diversity hypothesis: held-out zh should drop from 0.40 toward the 0.21 seen-text floor.
4
- # Keeps the proven v4 phone-level alignment. Run when teacher synth + GPU are free. GPU via $1 (default 1).
5
- set -e
6
- ZT=/home/luigi/jetson-tts/mossnano/zhtw8k; LOG=$ZT/v4zh_v2.log
7
- TRAIN=/home/luigi/moss-train-venv/bin/python
8
- GPU=${1:-1}
9
- VOC=$ZT/m2_vocoder_8k/hifigan-snake_8k-latest.pt
10
- exec >>"$LOG" 2>&1
11
- echo "===== V4ZH_V2 START $(date) GPU=$GPU ====="
12
-
13
- # 1) canonical-fix expansion manifest wav paths from id (idempotent, no doubling)
14
- $TRAIN - <<PY
15
- import json, os
16
- p="$ZT/teacher_corpus_expand/manifest.jsonl"; D="$ZT/teacher_corpus_expand"
17
- rows=[json.loads(l) for l in open(p) if l.strip()]
18
- ok=0
19
- for r in rows:
20
- r["wav"]=f"{D}/{r['id']}.wav"; ok+=os.path.exists(r["wav"])
21
- open(p,"w").write("\n".join(json.dumps(r,ensure_ascii=False) for r in rows)+"\n")
22
- print(f"[expand manifest] {len(rows)} rows, {ok} files exist")
23
- PY
24
-
25
- # 2) v4-align the expansion clips (phone-level)
26
- echo "[align expand] $(date)"
27
- CUDA_VISIBLE_DEVICES=$GPU $TRAIN $ZT/align_durations_v4.py \
28
- --manifest $ZT/teacher_corpus_expand/manifest.jsonl \
29
- --out $ZT/m_v4_expand_align.jsonl --device cuda
30
-
31
- # 3) abspath-fix + merge with existing v4 alignment
32
- $TRAIN - <<PY
33
- import json
34
- R="/home/luigi/jetson-tts/"
35
- def fix(p):
36
- rows=[json.loads(l) for l in open(p) if l.strip()]
37
- for r in rows:
38
- if not r["target_audio"].startswith("/"): r["target_audio"]=R+r["target_audio"]
39
- return rows
40
- a=fix("$ZT/m_v4_align.jsonl"); b=fix("$ZT/m_v4_expand_align.jsonl")
41
- out="$ZT/m_v4_v2_align.jsonl"
42
- open(out,"w").write("\n".join(json.dumps(r,ensure_ascii=False) for r in a+b)+"\n")
43
- print(f"[merged] {len(a)} + {len(b)} = {len(a)+len(b)} -> {out}")
44
- PY
45
-
46
- # 4) retrain on merged corpus (same recipe, frozen arch)
47
- echo "[v4zh-v2 acoustic] $(date)"
48
- cd /tmp/inflect-nano
49
- CUDA_VISIBLE_DEVICES=$GPU $TRAIN -m inflect_nano.acoustic --durations-jsonl $ZT/m_v4_v2_align.jsonl \
50
- --out-dir $ZT/v4zh_v2_acoustic_8k --vocoder-variant snake_8k --sample-rate 8000 \
51
- --steps 60000 --batch-size 16 --lr 2e-4 --max-frames 1000 --en-upsample 2 \
52
- --vocoder-checkpoint $VOC --vocoder-mel-weight 1.0 \
53
- --save-interval 5000 --log-interval 200 --device cuda
54
- echo "===== V4ZH_V2 TRAIN DONE $(date) ====="