Fix: Voice-Auto-Naming tot (TitaNet bricht bei langen Schnitten ab + vergiftete Promise-Kette)

identifySpeakers() embettete den laengsten Lauf ungekuerzt; TitaNet-ONNX bricht
ab 180 s ab (broadcast 12288 by 17998) und riss den spk_embed-Helfer mit. Da
spk.js die Aufrufe ueber eine Promise-Kette serialisiert, schlugen danach ALLE
weiteren Sprecher mit 'spk beendet' fehl.

- ID_CUT_SEC=25s in identifySpeakers
- Kette in spk.js und tdChain in recorder.js failure-isoliert
- pro Name gewinnt nur der beste Kosinus (Fabio war auf 2 Clustern)
This commit is contained in:
Claude
2026-07-27 17:30:43 +02:00
parent 48fa6b4f9e
commit 61531fc50a
5 changed files with 56 additions and 9 deletions
+3 -2
View File
@@ -147,11 +147,12 @@ function startTd() {
}
// One request at a time (single warm process), chained like spk.embed.
function runDaemonTranscribe(wavPath) {
tdChain = tdChain.then(async () => {
const run = tdChain.then(async () => {
await startTd();
return await new Promise((res, rej) => { tdPending = { resolve: res, reject: rej }; tdProc.stdin.write(wavPath + '\n'); });
});
return tdChain;
tdChain = run.then(() => {}, () => {}); // a failed call must not poison the queue
return run;
}
// Wav duration from file size (16 kHz mono s16 = 32000 B/s, 44 B header).
function wavDurationSec(wavPath) {