Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(call): remove call transcript diarized speaker id (#5466)
Will Hutchinson93bbcdff7738
diff --git a/apps/web/src/features/block-call/component/CallTranscript.tsx b/apps/web/src/features/block-call/component/CallTranscript.tsxindex 9a98173c94..182cfae3e6 100644--- a/apps/web/src/features/block-call/component/CallTranscript.tsx+++ b/apps/web/src/features/block-call/component/CallTranscript.tsx@@ -23,7 +23,6 @@ const GROUPING_WINDOW_MS = 5 * 60 * 1000;type SegmentItem = {segment: CallRecordTranscriptSegment;groupedWithPrevious: boolean;- diarizedSpeakerLabel?: string;};function getDiarizedSpeakerId(@@ -32,35 +31,6 @@ function getDiarizedSpeakerId(return segment?.diarizedSpeakerId ?? undefined;}-function buildDiarizedSpeakerLabels(- transcript: CallRecordTranscriptSegment[]-): Map<string, Map<string, string>> {- const labelsBySpeakerId = new Map<string, Map<string, string>>();- for (const segment of transcript) {- const diarizedSpeakerId = getDiarizedSpeakerId(segment);- if (!diarizedSpeakerId) continue;-- let labels = labelsBySpeakerId.get(segment.speakerId);- if (!labels) {- labels = new Map<string, string>();- labelsBySpeakerId.set(segment.speakerId, labels);- }-- if (labels.has(diarizedSpeakerId)) continue;- labels.set(diarizedSpeakerId, `Speaker #${labels.size}`);- }- return labelsBySpeakerId;-}--function getDiarizedSpeakerLabel(- labelsBySpeakerId: Map<string, Map<string, string>>,- segment: CallRecordTranscriptSegment-): string | undefined {- const diarizedSpeakerId = getDiarizedSpeakerId(segment);- if (!diarizedSpeakerId) return undefined;- return labelsBySpeakerId.get(segment.speakerId)?.get(diarizedSpeakerId);-}-function shouldGroupWithPrevious(current: CallRecordTranscriptSegment,previous: CallRecordTranscriptSegment | undefined@@ -99,7 +69,6 @@ function TranscriptSegmentRow(props: {channelId: string;isActive: boolean;timelineStartMs: number | null;- diarizedSpeakerLabel?: string;onSeekToSeconds?: (seconds: number) => void;}) {const message = segmentToApiChannelMessage(props.segment, props.channelId);@@ -126,11 +95,6 @@ function TranscriptSegmentRow(props: {><Message.SenderName /><span class="ml-auto flex shrink-0 items-center gap-2 text-xs text-ink-muted">- <Show when={props.diarizedSpeakerLabel}>- <span class="font-medium whitespace-nowrap">- {props.diarizedSpeakerLabel}- </span>- </Show><span class="tabular-nums"><Showwhen={videoTimestamp !== null}@@ -208,21 +172,11 @@ export function CallTranscript(props: {const sorted = [...props.transcript].sort((a, b) => a.sequenceNum - b.sequenceNum);- const diarizedSpeakerLabels = buildDiarizedSpeakerLabels(sorted);const items: SegmentItem[] = sorted.map((segment, index) => {const previous = sorted[index - 1];- const diarizedSpeakerId = getDiarizedSpeakerId(segment);- const previousDiarizedSpeakerId = getDiarizedSpeakerId(previous);- const shouldShowDiarizedSpeakerLabel =- !!diarizedSpeakerId &&- (segment.speakerId !== previous?.speakerId ||- diarizedSpeakerId !== previousDiarizedSpeakerId);return {segment,groupedWithPrevious: shouldGroupWithPrevious(segment, previous),- diarizedSpeakerLabel: shouldShowDiarizedSpeakerLabel- ? getDiarizedSpeakerLabel(diarizedSpeakerLabels, segment)- : undefined,};});return { items };@@ -401,7 +355,6 @@ export function CallTranscript(props: {item.segment.sequenceNum === props.activeSequenceNum}timelineStartMs={props.timelineStartMs}- diarizedSpeakerLabel={item.diarizedSpeakerLabel}onSeekToSeconds={props.onSeekToSeconds}/></div>