From: Taran Nathan Date: Wed, 22 Jul 2026 21:01:09 +0000 (-0700) Subject: gitignore more X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=6f23ee494e7a52b97fc7b84b24d32b395f61af03;p=audio-stream.git gitignore more --- diff --git a/.gitignore b/.gitignore index d35b540..e8c5732 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ +build +target +.env note.md + diff --git a/script.js b/script.js index 5f9e3e2..5356538 100644 --- a/script.js +++ b/script.js @@ -26,7 +26,7 @@ const TARGET_SAMPLE_RATE = 16000; function speakerDisplayName(speakerLabel) { if (!speakerLabel || speakerLabel === "PENDING") { - return "Speaker \u2026"; // "Speaker …" while diarization is still resolving + return "Speaker \u2026"; } return `Speaker ${speakerLabel}`; } @@ -53,8 +53,6 @@ function renderTranscription() { const speakerName = speakerDisplayName(turn.speakerLabel); - // Start a new visual group whenever the speaker changes, so consecutive - // turns from the same speaker stay together instead of re-labeling each one. if (speakerName !== lastSpeakerName) { currentGroupEl = document.createElement("div"); currentGroupEl.className = "transcript-turn"; @@ -125,10 +123,6 @@ function cleanupCaptureResources(closeTranscriptionSocket = true) { } } -// Handles the live "Turn" events. speaker_label starts as "PENDING" and may -// resolve to a real label (e.g. "A") once diarization has enough context. -// The same turn_order is sent repeatedly with growing transcript text until -// end_of_turn is true. function handleTurnEvent(payload) { if (typeof payload.turn_order !== "number") { return; @@ -148,10 +142,6 @@ function handleTurnEvent(payload) { renderTranscription(); } -// Handles "SpeakerRevision" events, which retroactively correct the speaker -// label for one or more already-seen turns (identified by turn_order). -// This is what lets us fix a turn that was rendered as "PENDING" or -// mis-attributed once the diarization model is more confident. function handleSpeakerRevisionEvent(payload) { const revisions = Array.isArray(payload.revisions) ? payload.revisions : []; if (revisions.length === 0) {