feat: ampliado o catálogo de modelos Whisper exibido no painel
- ampliado o catálogo de modelos Whisper exibido no painel Resumo: - 1 arquivos alterados - 0 novos - 1 modificados - 0 removidos 1 file changed, 19 insertions(+), 9 deletions(-) Arquivos: - code/cep-plugin/main.js
This commit is contained in:
+19
-9
@@ -1853,10 +1853,9 @@ var SILENCE_DOWNLOAD_SCRIPT = "/Volumes/Merongo/SISTEMAS/WHISPERX/transcricao/do
|
|||||||
var SILENCE_DIARIZE_SCRIPT = "/Volumes/Merongo/SISTEMAS/WHISPERX/transcricao/diarize_cli.py";
|
var SILENCE_DIARIZE_SCRIPT = "/Volumes/Merongo/SISTEMAS/WHISPERX/transcricao/diarize_cli.py";
|
||||||
var VOICE_FEATURES_SCRIPT = "/Volumes/Merongo/SISTEMAS/WHISPERX/transcricao/voice_features_cli.py";
|
var VOICE_FEATURES_SCRIPT = "/Volumes/Merongo/SISTEMAS/WHISPERX/transcricao/voice_features_cli.py";
|
||||||
var EDITORIAL_ACTIONS_APPLY_SCRIPT_FALLBACK = "/Volumes/Merongo/SISTEMAS/GENIAL SISTEMAS/Jhonny/code/scripts/apply-editorial-actions.mjs";
|
var EDITORIAL_ACTIONS_APPLY_SCRIPT_FALLBACK = "/Volumes/Merongo/SISTEMAS/GENIAL SISTEMAS/Jhonny/code/scripts/apply-editorial-actions.mjs";
|
||||||
// Catálogo dos tamanhos oficiais do faster-whisper hospedados pela Systran no
|
// Catálogo dos modelos compatíveis com faster-whisper e aceitos pelo pipeline
|
||||||
// Hugging Face (org consistente — outras variantes como distil-* e large-v3-turbo
|
// local. As variantes destilada e turbo também são suportadas pelo carregador,
|
||||||
// vivem em orgs diferentes com nomes de pasta inconsistentes, por isso ficam de fora
|
// embora tenham organizações diferentes no Hugging Face.
|
||||||
// por ora). Ordenado do mais rápido/impreciso ao mais lento/preciso.
|
|
||||||
var MODEL_CATALOG = [
|
var MODEL_CATALOG = [
|
||||||
{ value: "tiny", label: "Tiny", approxMB: 75 },
|
{ value: "tiny", label: "Tiny", approxMB: 75 },
|
||||||
{ value: "base", label: "Base", approxMB: 145 },
|
{ value: "base", label: "Base", approxMB: 145 },
|
||||||
@@ -1865,6 +1864,8 @@ var MODEL_CATALOG = [
|
|||||||
{ value: "large-v1", label: "Large v1", approxMB: 3100 },
|
{ value: "large-v1", label: "Large v1", approxMB: 3100 },
|
||||||
{ value: "large-v2", label: "Large v2", approxMB: 3100 },
|
{ value: "large-v2", label: "Large v2", approxMB: 3100 },
|
||||||
{ value: "large-v3", label: "Large v3", approxMB: 3100 },
|
{ value: "large-v3", label: "Large v3", approxMB: 3100 },
|
||||||
|
{ value: "large-v3-turbo", label: "Large v3 Turbo", approxMB: 1620 },
|
||||||
|
{ value: "distil-large-v3", label: "Distil Large v3", approxMB: 1500 },
|
||||||
];
|
];
|
||||||
var DEFAULT_MODEL = "small";
|
var DEFAULT_MODEL = "small";
|
||||||
|
|
||||||
@@ -3113,14 +3114,23 @@ function syncTranscribeModelSelect() {
|
|||||||
if (!select) return;
|
if (!select) return;
|
||||||
var current = select.value;
|
var current = select.value;
|
||||||
select.innerHTML = "";
|
select.innerHTML = "";
|
||||||
MODEL_CATALOG.forEach(function (m) {
|
var modelosDisponiveis = discoverPortugueseModelsOnMerongo();
|
||||||
|
modelosDisponiveis.forEach(function (modelo) {
|
||||||
var opt = document.createElement("option");
|
var opt = document.createElement("option");
|
||||||
opt.value = m.value;
|
opt.value = modelo.nome;
|
||||||
opt.textContent = m.label;
|
opt.textContent = modelo.nome + " · " + formatMB(modelo.tamanho);
|
||||||
select.appendChild(opt);
|
select.appendChild(opt);
|
||||||
});
|
});
|
||||||
var wanted = MODEL_CATALOG.some(function (m) { return m.value === current; }) ? current : loadDefaultModel();
|
if (!modelosDisponiveis.length) {
|
||||||
select.value = wanted;
|
var vazio = document.createElement("option");
|
||||||
|
vazio.value = "";
|
||||||
|
vazio.textContent = "Nenhum modelo instalado";
|
||||||
|
select.appendChild(vazio);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var nomes = modelosDisponiveis.map(function (modelo) { return modelo.nome; });
|
||||||
|
var desejado = nomes.indexOf(current) >= 0 ? current : loadDefaultModel();
|
||||||
|
select.value = nomes.indexOf(desejado) >= 0 ? desejado : nomes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- Settings tab: HF token ----
|
// ---- Settings tab: HF token ----
|
||||||
|
|||||||
Reference in New Issue
Block a user