Kleineres Modell

This commit is contained in:
2026-06-19 17:22:28 +02:00
parent a5230964cb
commit 404c632cfc
20 changed files with 66 additions and 60 deletions

View File

@@ -6,8 +6,8 @@ API-Felder und UI-Pfade es gibt und welche Fallstricke (Embedding-Dimensionen,
Stimm-Drift) zu beachten sind.
> Stand: 2026-06-17. Quelle: Code in diesem Repo (`docker-compose.yml`,
> `entrypoint*.sh`, `voice_clone_ui.py`, `ui/voice-cloning.html`,
> `patch_qwen3_tts_runtime.py`, `start_*.sh`) + `docs/PROJECT_OVERVIEW.md`.
> `docker/entrypoint*.sh`, `docker/voice_clone_ui.py`, `ui/voice-cloning.html`,
> `docker/patch_qwen3_tts_runtime.py`, `scripts/start_*.sh`) + `docs/PROJECT_OVERVIEW.md`.
---
@@ -49,28 +49,28 @@ HF-Cache (`/home/guru/vllm/data/root:/root`), laufen aber **nicht gleichzeitig**
(Start-Skripte stoppen jeweils den anderen).
### 1. Haupt-Container `qwen3-tts` (Port 8091/8092/8094)
- Startet via `entrypoint.sh`: `vllm-omni serve`, plus
- Browser-UI (`voice_clone_ui.py`) auf **8092**
- WS-Logging-Proxy (`ws_log_proxy.py`) auf **8094**
- Runtime-Patch (`patch_qwen3_tts_runtime.py`) für Seed-Propagation im WS-Pfad
- Startet via `docker/entrypoint.sh`: `vllm-omni serve`, plus
- Browser-UI (`docker/voice_clone_ui.py`) auf **8092**
- WS-Logging-Proxy (`docker/ws_log_proxy.py`) auf **8094**
- Runtime-Patch (`docker/patch_qwen3_tts_runtime.py`) für Seed-Propagation im WS-Pfad
- Auto-Warmup-Request nach `/health`
- Modell wählbar über `QWEN3_TTS_MODEL`:
- `./start_custom_tts.sh` → CustomVoice (kein Cloning, schnell, Standard)
- `./start_dialog_tts.sh`**Base** (Cloning + feste Dialogstimmen)
- `./start_tts.sh` / `./start.sh` → respektiert `QWEN3_TTS_MODEL`, Default CustomVoice
- `./stop_tts.sh` → stoppt + entfernt den Container
- `./scripts/start_custom_tts.sh` → CustomVoice (kein Cloning, schnell, Standard)
- `./scripts/start_dialog_tts.sh`**Base** (Cloning + feste Dialogstimmen)
- `./scripts/start_tts.sh` / `./scripts/start.sh` → respektiert `QWEN3_TTS_MODEL`, Default CustomVoice
- `./scripts/stop_tts.sh` → stoppt + entfernt den Container
### 2. Optionaler Clone-Container `qwen3-tts-clone` (Port 8093, Compose-Profil `clone`)
- Trennt Cloning von produktiver Ausgabe. Eigenes `entrypoint_clone.sh`,
- Trennt Cloning von produktiver Ausgabe. Eigenes `docker/entrypoint_clone.sh`,
`gpu-memory-utilization 0.10`, `restart: "no"`.
- Start: `QWEN3_TTS_CLONE_MODEL=<modell> ./start_clone.sh`
- Start: `QWEN3_TTS_CLONE_MODEL=<modell> ./scripts/start_clone.sh`
(Default-Modell: `Qwen3-TTS-12Hz-1.7B-Base`). Stoppt automatisch `qwen3-tts`.
- Verwaltung: `./clone_model.sh {load|unload|status|logs}`, `./stop_clone.sh`.
- Verwaltung: `./scripts/clone_model.sh {load|unload|status|logs}`, `./scripts/stop_clone.sh`.
- UI-Proxy-Routen dafür: `GET /api/clone/health`, `POST /api/clone/speech`.
### Modell-Download (einmalig)
```bash
./download_qwen3_tts_base.sh # lädt Qwen3-TTS-12Hz-1.7B-Base in den Cache
./scripts/download_qwen3_tts_base.sh # lädt Qwen3-TTS-12Hz-1.7B-Base in den Cache
```
(Beide Modelle sind aktuell bereits im Cache vorhanden.)
@@ -79,8 +79,8 @@ HF-Cache (`/home/guru/vllm/data/root:/root`), laufen aber **nicht gleichzeitig**
## Klon-Workflow (empfohlen, über die UI)
```bash
./download_qwen3_tts_base.sh # nur falls Base noch nicht im Cache
./start_dialog_tts.sh # startet qwen3-tts mit dem Base-Modell
./scripts/download_qwen3_tts_base.sh # nur falls Base noch nicht im Cache
./scripts/start_dialog_tts.sh # startet qwen3-tts mit dem Base-Modell
# Browser: http://localhost:8092/
```
@@ -136,7 +136,7 @@ Voice registrieren: `POST /v1/audio/voices` (multipart) — Felder `audio_sample
---
## UI-Proxy-Routen (`voice_clone_ui.py`, Port 8092)
## UI-Proxy-Routen (`docker/voice_clone_ui.py`, Port 8092)
Same-Origin-Proxy, vermeidet CORS im Browser:
@@ -169,7 +169,7 @@ Verteilung → Timbre/Tonhöhe driften über Dialog-Turns.
128169 Hz (~11 %), Spektralzentroid ~11 %.
- **Temperatur/top_k senken hilft nicht** — Drift kommt nicht vom Sampling.
- `seed` allein reicht nicht (ersetzt keinen Speaker-Anker), wird aber im
WS-Pfad jetzt korrekt pro Segment durchgereicht (`patch_qwen3_tts_runtime.py`).
WS-Pfad jetzt korrekt pro Segment durchgereicht (`docker/patch_qwen3_tts_runtime.py`).
**Lösungen:**
1. **Fester Speaker-Anker (eigentliche Lösung):** Referenz-WAV bzw. 2048-dim
@@ -191,7 +191,7 @@ nutzen. Braucht VoiceDesign UND Base.
2048-dim → `RuntimeError: Expected size 2048 but got size 1024`. Container
fängt sich via `restart: unless-stopped` + Warmup in Sekunden. Die UI fängt
diesen Fall vorab ab und zeigt eine erklärende Fehlermeldung.
- Für Cloning **muss** das Base-Modell laufen (`start_dialog_tts.sh` oder
- Für Cloning **muss** das Base-Modell laufen (`scripts/start_dialog_tts.sh` oder
Clone-Service), nicht der Default-CustomVoice-Betrieb.
- Image ist nicht auf Digest gepinnt (`vllm/vllm-omni:latest-aarch64`); Updates
können API-Verhalten ändern.
@@ -204,16 +204,16 @@ nutzen. Braucht VoiceDesign UND Base.
```bash
# Cloning-fähigen Betrieb starten (Base-Modell)
./start_dialog_tts.sh
./scripts/start_dialog_tts.sh
# UI: http://localhost:8092/ API: http://localhost:8091
# Zurück auf schnellen Standardbetrieb (keine Klone)
./start_custom_tts.sh
./scripts/start_custom_tts.sh
# Getrennter Clone-Service auf Port 8093
QWEN3_TTS_CLONE_MODEL=Qwen/Qwen3-TTS-12Hz-1.7B-Base ./start_clone.sh
./clone_model.sh status|logs|unload
./stop_clone.sh
QWEN3_TTS_CLONE_MODEL=Qwen/Qwen3-TTS-12Hz-1.7B-Base ./scripts/start_clone.sh
./scripts/clone_model.sh status|logs|unload
./scripts/stop_clone.sh
# Base-Modell herunterladen (einmalig)
./download_qwen3_tts_base.sh