Voci dei personaggi con XTTS: una per battuta, castello e leone con voci proprie
tools/voci.mjs (make voci) genera un mp3 per ogni battuta con la voce del personaggio scelta in tools/voci.json, solo per i testi nuovi o cambiati; tools/voci_xtts.py divide le frasi e toglie punti finali e caporali, che XTTS in italiano leggeva («Buongiorno, punto»). Nel gioco il fumetto dura quanto la voce, la musica si abbassa mentre si parla, il muto spegne anche le voci. Il leone ora parla e i personaggi parlano dalla posizione che la scena dichiara (speakers), che prima era ignorata. Tutte le voci verificate con Whisper; test: ogni battuta ha la sua voce, il fumetto non finisce prima della voce, la musica si abbassa (provati con errori iniettati). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UdeKd62opy9PKgpQXtVctF
This commit is contained in:
@@ -7,6 +7,7 @@ COPY src /usr/share/nginx/html/src
|
|||||||
COPY assets/scenes /usr/share/nginx/html/assets/scenes
|
COPY assets/scenes /usr/share/nginx/html/assets/scenes
|
||||||
COPY assets/characters /usr/share/nginx/html/assets/characters
|
COPY assets/characters /usr/share/nginx/html/assets/characters
|
||||||
COPY assets/audio /usr/share/nginx/html/assets/audio
|
COPY assets/audio /usr/share/nginx/html/assets/audio
|
||||||
|
COPY assets/voices /usr/share/nginx/html/assets/voices
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
|
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ DST ?= assets/scenes/$(notdir $(SRC))
|
|||||||
CROP ?=
|
CROP ?=
|
||||||
COLORS ?= 64
|
COLORS ?= 64
|
||||||
|
|
||||||
.PHONY: help serve open test browser verify sfondi sfondi-genera sfondi-confronto background character \
|
.PHONY: help serve open test browser verify voci voci-elenco sfondi sfondi-genera sfondi-confronto background character \
|
||||||
build up down restart logs ps shell image-size clean distclean
|
build up down restart logs ps shell image-size clean distclean
|
||||||
|
|
||||||
## ------------------------------------------------------------ sviluppo
|
## ------------------------------------------------------------ sviluppo
|
||||||
@@ -54,6 +54,12 @@ verify: test browser ## Tutti i controlli
|
|||||||
|
|
||||||
## ------------------------------------------------------------ grafica
|
## ------------------------------------------------------------ grafica
|
||||||
|
|
||||||
|
voci: ## Voci dei personaggi con XTTS sulla GPU: solo le battute nuove o cambiate (RIFAI='testo' per ritentarne una)
|
||||||
|
$(NODE) tools/voci.mjs $(if $(RIFAI),--rifai "$(RIFAI)")
|
||||||
|
|
||||||
|
voci-elenco: ## Quali battute mancano di voce, senza generare niente
|
||||||
|
$(NODE) tools/voci.mjs --dry
|
||||||
|
|
||||||
sfondi: ## Prova a secco del generatore: quali foto di assets/raw/foto/ genererebbe (nessuna API)
|
sfondi: ## Prova a secco del generatore: quali foto di assets/raw/foto/ genererebbe (nessuna API)
|
||||||
$(PYTHON) tools/genera.py --dry-run
|
$(PYTHON) tools/genera.py --dry-run
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,19 @@ di prepararne copie a 640×360 per il gioco.
|
|||||||
python3 tools/genera.py --dry-run # elenco delle foto, nessuna API e nessun file scritto
|
python3 tools/genera.py --dry-run # elenco delle foto, nessuna API e nessun file scritto
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Voci dei personaggi
|
||||||
|
|
||||||
|
Ogni battuta ha la sua voce, generata con XTTS-v2 sulla GPU (licenza solo non commerciale): un mp3 per battuta in
|
||||||
|
`assets/voices/`, la voce di ogni personaggio in `tools/voci.json` (castello e leone con altezza ed eco proprie).
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
make voci # solo le battute nuove o cambiate; i file che non servono più si tolgono
|
||||||
|
make voci RIFAI='Ci sei?' # ritenta una battuta storpiata (XTTS è casuale: di solito il secondo tentativo va)
|
||||||
|
make voci-elenco # cosa manca, senza generare
|
||||||
|
```
|
||||||
|
|
||||||
|
Il test `tests/voices.test.mjs` fallisce se una battuta non ha la sua voce: dopo aver cambiato un testo, `make voci`.
|
||||||
|
|
||||||
## Giocare in locale
|
## Giocare in locale
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user