readme: demo + social links, data rationale; revert to working model load; ghost dial 3/4 distinct
Browse files
README.md
CHANGED
|
@@ -48,9 +48,9 @@ It is also not a DSP trick. Reverb, formant-shift, and vocoders act uniformly on
|
|
| 48 |
|
| 49 |
## How it was built
|
| 50 |
|
| 51 |
-
There is no dataset of "sentences gradually dissolving into nonsense", so we made one.
|
| 52 |
|
| 53 |
-
1. Take 3000 public-domain sentences (Project Gutenberg + LibriSpeech).
|
| 54 |
2. For each, generate five corrupted phoneme variants at substitution rates 0, 0.25, 0.5, 0.75, 1.0. The corruption keeps the English phoneme inventory, preserves syllable count and stress, and leans toward open CV syllables. This is grounded in the phonetics of real glossolalia (Samarin 1972, Goodman 1972; Link & Tomaschek 2024 measured 95.7% CV structure across 7,486 glossolalic syllables).
|
| 55 |
3. Have base F5-TTS read each corrupted variant in two reference voices. That gives 30,000 (audio, original-sentence, level, voice) tuples.
|
| 56 |
4. Fine-tune a LoRA so that, given the *original* sentence plus a `tongues N` token, it reproduces the level-N audio. The model never sees the corrupted text. It learns the mapping from the dial alone.
|
|
@@ -96,8 +96,8 @@ Nothing calls a cloud API. Every model runs on the Space.
|
|
| 96 |
- **Model (LoRA):** https://huggingface.co/akshan-main/glossolalia-dial-lora
|
| 97 |
- **Code:** https://github.com/akshan-main/glossolalia
|
| 98 |
- **Field Notes:** https://github.com/akshan-main/glossolalia/blob/main/BLOG.md
|
| 99 |
-
- **Demo video:**
|
| 100 |
-
- **Social post:**
|
| 101 |
|
| 102 |
## Team
|
| 103 |
|
|
|
|
| 48 |
|
| 49 |
## How it was built
|
| 50 |
|
| 51 |
+
There is no dataset of "sentences gradually dissolving into nonsense", so we made one. This is the whole reason a single person can build this: instead of hunting for labeled data that does not exist, we manufacture the training target from plain text.
|
| 52 |
|
| 53 |
+
1. Take 3000 public-domain sentences (Project Gutenberg + LibriSpeech). Public-domain on purpose: the corpus is rights-clean and the build is reproducible end to end, which also keeps the project Off-the-Grid (no scraped or licensed text, no cloud calls).
|
| 54 |
2. For each, generate five corrupted phoneme variants at substitution rates 0, 0.25, 0.5, 0.75, 1.0. The corruption keeps the English phoneme inventory, preserves syllable count and stress, and leans toward open CV syllables. This is grounded in the phonetics of real glossolalia (Samarin 1972, Goodman 1972; Link & Tomaschek 2024 measured 95.7% CV structure across 7,486 glossolalic syllables).
|
| 55 |
3. Have base F5-TTS read each corrupted variant in two reference voices. That gives 30,000 (audio, original-sentence, level, voice) tuples.
|
| 56 |
4. Fine-tune a LoRA so that, given the *original* sentence plus a `tongues N` token, it reproduces the level-N audio. The model never sees the corrupted text. It learns the mapping from the dial alone.
|
|
|
|
| 96 |
- **Model (LoRA):** https://huggingface.co/akshan-main/glossolalia-dial-lora
|
| 97 |
- **Code:** https://github.com/akshan-main/glossolalia
|
| 98 |
- **Field Notes:** https://github.com/akshan-main/glossolalia/blob/main/BLOG.md
|
| 99 |
+
- **Demo video:** https://youtu.be/dDOaBNfihyo
|
| 100 |
+
- **Social post:** https://x.com/frutigeraerosol/status/2066667649338417367
|
| 101 |
|
| 102 |
## Team
|
| 103 |
|
app.py
CHANGED
|
@@ -272,12 +272,9 @@ class TTSEngine:
|
|
| 272 |
# Lazy-loaded inside generate(), which on ZeroGPU runs under @spaces.GPU, so
|
| 273 |
# F5-TTS's auto device detection picks the allocated GPU. (On the T4 Space it
|
| 274 |
# loads to cuda directly; locally it falls back to CPU.)
|
| 275 |
-
#
|
| 276 |
-
#
|
| 277 |
-
|
| 278 |
-
# bind to the GPU. On T4/local, device=None auto-detects (cuda on T4, cpu locally).
|
| 279 |
-
self._tts = F5TTS(model="F5TTS_v1_Base",
|
| 280 |
-
device=("cuda" if _ON_ZEROGPU else None))
|
| 281 |
self.live = True
|
| 282 |
print(f"[engine] F5-TTS base loaded (device={self._tts.device})")
|
| 283 |
if LORA_PATH:
|
|
@@ -407,18 +404,6 @@ class TTSEngine:
|
|
| 407 |
|
| 408 |
ENGINE = TTSEngine()
|
| 409 |
|
| 410 |
-
# ZeroGPU: load the model at IMPORT, not lazily inside the first @spaces.GPU call. Lazy
|
| 411 |
-
# loading initialized real CUDA inside the first GPU worker, after ZeroGPU's fork-server had
|
| 412 |
-
# already snapshotted the process, so the first call worked but the SECOND died in worker_init
|
| 413 |
-
# ("No CUDA GPUs are available"). Loading here puts the model's CUDA placement under `spaces`'
|
| 414 |
-
# deferred-CUDA tracking, so every GPU call re-materializes it and consecutive calls work.
|
| 415 |
-
# Hedged: if eager load fails, _tts stays None and the lazy path still runs (no worse off).
|
| 416 |
-
if _ON_ZEROGPU:
|
| 417 |
-
try:
|
| 418 |
-
ENGINE._ensure()
|
| 419 |
-
except Exception as _e:
|
| 420 |
-
print(f"[engine] eager ZeroGPU load failed, will lazy-load: {_e}")
|
| 421 |
-
|
| 422 |
|
| 423 |
# ----- crossfading for Morph mode -----
|
| 424 |
|
|
|
|
| 272 |
# Lazy-loaded inside generate(), which on ZeroGPU runs under @spaces.GPU, so
|
| 273 |
# F5-TTS's auto device detection picks the allocated GPU. (On the T4 Space it
|
| 274 |
# loads to cuda directly; locally it falls back to CPU.)
|
| 275 |
+
# Auto device detection: cuda on the T4 Space, the allocated GPU inside a ZeroGPU
|
| 276 |
+
# worker (generate runs under @spaces.GPU), cpu locally.
|
| 277 |
+
self._tts = F5TTS(model="F5TTS_v1_Base")
|
|
|
|
|
|
|
|
|
|
| 278 |
self.live = True
|
| 279 |
print(f"[engine] F5-TTS base loaded (device={self._tts.device})")
|
| 280 |
if LORA_PATH:
|
|
|
|
| 404 |
|
| 405 |
ENGINE = TTSEngine()
|
| 406 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
|
| 408 |
# ----- crossfading for Morph mode -----
|
| 409 |
|