uncloseai-speech/scripts
russell@unturf.com c5247cd993
whisper_refs: normalize transcripts (sentence-case, strip quote artifacts)
normalize_text() handles three Whisper quirks that produced messy F5
ref_texts:

  1. Lowercase output with no terminal period — capitalize first letter,
     append "." if missing.
  2. Hallucinated "' clusters Whisper inserts when it interprets a
     fragment as quoted dialogue (cora, ivan, atlas, hope had these).
     Strip everywhere; never legitimate English punctuation.
  3. Trailing apostrophe-then-period (.'.) from earlier rounds where a
     closing-quoted line got an extra "." appended — collapse to single
     terminal. Function is now idempotent.

Adds --from-cache flag: skip ASR, re-apply normalize from cached
whisper_refs.json. No GPU needed, useful after tuning the normalizer.
Lazy-imports torch so --from-cache works on any host.

Affects 9 of 40 voices: clara, grace, hazel, iris, felix, hugo
(lowercase fix); cora, ivan, atlas, hope (quote-cluster fix).
2026-05-24 16:02:18 -04:00
..
add_voice.py Organize repository: create scripts/ and docs/ directories 2025-11-09 09:25:21 -05:00
download_diverse_voices.py Add idempotent voice registry system for permanent speaker-to-name assignments 2026-01-27 13:59:39 -05:00
download_diverse_voices.sh Add 20 diverse voice samples for Qwen3-TTS 2026-01-26 16:50:54 -05:00
download_samples.sh Organize repository: create scripts/ and docs/ directories 2025-11-09 09:25:21 -05:00
download_voice_samples.sh Use LJ Speech sample for voice cloning (Alibaba Cloud URL blocked) 2026-01-26 16:28:39 -05:00
fetch_voices.py Add 20 diverse voice samples for Qwen3-TTS 2026-01-26 16:50:54 -05:00
say.py Organize repository: create scripts/ and docs/ directories 2025-11-09 09:25:21 -05:00
test_voices.sh Organize repository: create scripts/ and docs/ directories 2025-11-09 09:25:21 -05:00
whisper_refs.py whisper_refs: normalize transcripts (sentence-case, strip quote artifacts) 2026-05-24 16:02:18 -04:00