Integração: falantes + dublagem + vídeo final

- editor_api: importa dub e speakers juntos.
- voice_chunks (falantes) vira a migração v15, depois da v14 do vídeo final (antes era criada fora das migrações).
- dub.voice_for: qualquer voz que não é o streamer (other1, other2…) usa a segunda voz da dublagem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mateuus
2026-11-18 03:59:44 -03:00
co-authored by Claude Opus 5.5
24 changed files with 1671 additions and 129 deletions
+8
View File
@@ -327,3 +327,11 @@ def test_preview_and_queue_render_dub_the_same_way(api, monkeypatch):
assert clip["status"] == "ready", clip["error"]
# Fila: a 1ª fala veio do cache da prévia; a do "other" saiu com a segunda voz.
assert synth.calls == [(layout.DUB_VOICE, "Não acredito."), (layout.DUB_VOICE_OTHER, "Mano.")]
def test_numbered_other_speakers_use_the_second_voice():
"""Integração com FALANTES.md: a separação entrega `other1`, `other2`…; todas usam a segunda voz."""
from app.dub import voice_for
opts = {"voice": "a", "voiceOther": "b"}
assert voice_for({"speaker": "other1"}, opts) == "b" and voice_for({"speaker": "other2"}, opts) == "b"
assert voice_for({"speaker": "streamer"}, opts) == "a" and voice_for({}, opts) == "a"