diff --git a/code/cep-plugin/index.html b/code/cep-plugin/index.html
index e015170..e212506 100755
--- a/code/cep-plugin/index.html
+++ b/code/cep-plugin/index.html
@@ -138,6 +138,11 @@
Detectar quem fala logo após transcrever
+
+
Falantes detectados
@@ -170,8 +175,8 @@
3
-
Enriquecer a transcrição opcional
-
Dados extras que deixam o corte por IA mais preciso.
+
Revisar falantes e áudio opcional
+
Confira os resultados processados e ajuste os dados antes de gerar o JSON.
Bloqueado
@@ -181,14 +186,14 @@
Detecção de falantesSepara os falantes por trecho. Precisa do token Hugging Face.
-
+
Métricas de vozPitch, energia, velocidade de fala e pausas de cada trecho.
-
+
diff --git a/code/cep-plugin/main.js b/code/cep-plugin/main.js
index d449ea5..e9618aa 100755
--- a/code/cep-plugin/main.js
+++ b/code/cep-plugin/main.js
@@ -1786,15 +1786,25 @@ function silenceTranscribe() {
}
taskEnd(true, "Transcrição pronta: " + resumo);
unlockAfterTranscript();
- if (document.getElementById("silenceDiarize").checked) {
- silenceDiarizeSpeakers();
- }
+ silenceRunAutomaticEnrichments();
},
hfSpawnOptions()
);
}
-function silenceDiarizeSpeakers() {
+function silenceRunAutomaticEnrichments() {
+ var shouldDiarize = document.getElementById("silenceDiarize").checked && !!loadHfToken();
+ var shouldMeasureVoice = document.getElementById("silenceVoiceFeaturesAuto").checked;
+ if (shouldDiarize) {
+ silenceDiarizeSpeakers(function () {
+ if (shouldMeasureVoice) silenceComputeVoiceFeatures();
+ });
+ } else if (shouldMeasureVoice) {
+ silenceComputeVoiceFeatures();
+ }
+}
+
+function silenceDiarizeSpeakers(onFinished) {
if (!silenceState.transcriptPath) return;
if (!silenceState.mediaPath) {
silenceLog("Detecte o clipe/sequência primeiro (passo 1) para saber qual vídeo diarizar.", "err");
@@ -1843,6 +1853,7 @@ function silenceDiarizeSpeakers() {
setStep(3, "done", "Enriquecido");
taskEnd(true, msg);
syncTranscriptToCache();
+ if (typeof onFinished === "function") onFinished();
},
hfSpawnOptions()
);