From 5b2d0d02156c2ee125a8df2a03d356457ae58e6b Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Mon, 8 Jul 2024 15:35:05 -0400 Subject: [PATCH] fixes transcript parts being hidden --- src/lib/transcript/Transcript.svelte | 2 +- src/server/transcripts/transcripts.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/transcript/Transcript.svelte b/src/lib/transcript/Transcript.svelte index 342928724..daa9b0178 100644 --- a/src/lib/transcript/Transcript.svelte +++ b/src/lib/transcript/Transcript.svelte @@ -17,7 +17,7 @@ export let show: Show; const slim_transcript: SlimUtterance[] = getSlimUtterances(transcript.utterances, 1) - .filter((utterance) => utterance.speakerId !== 99) + // .filter((utterance) => utterance.speakerId !== 99) .filter((utterance) => { // Remove the flagging utterances const scott = new RegExp(/purple cheese before meeting/gi); diff --git a/src/server/transcripts/transcripts.ts b/src/server/transcripts/transcripts.ts index ba0e4a964..647d6c5a1 100644 --- a/src/server/transcripts/transcripts.ts +++ b/src/server/transcripts/transcripts.ts @@ -23,7 +23,7 @@ export async function save_transcript_to_db(show: Show, utterances: Utterance[]) punctuated_word: word.punctuated_word || word.word, word: word.word, speaker_confidence: word.confidence, - speaker: word.speaker || 99, + speaker: word.speaker ?? 99, confidence: word.confidence }; }); @@ -33,8 +33,8 @@ export async function save_transcript_to_db(show: Show, utterances: Utterance[]) transcript_value: utterance.transcript, channel: utterance.channel, confidence: utterance.confidence, - speaker: utterance.speaker || 99, - speakerName: speakerMap.get(utterance.speaker || 99), + speaker: utterance.speaker ?? 99, + speakerName: speakerMap.get(utterance.speaker ?? 99), words: { create: words }