MCPcopy Create free account
hub / github.com/SamuelZ12/longcut / normalizeTranscript

Function normalizeTranscript

lib/topic-utils.ts:89–102  ·  view source on GitHub ↗
(
  transcript: TranscriptSegment[] | null | undefined,
)

Source from the content-addressed store, hash-verified

87}
88
89export function normalizeTranscript(
90 transcript: TranscriptSegment[] | null | undefined,
91): TranscriptSegment[] {
92 if (!Array.isArray(transcript)) return [];
93
94 const normalized: TranscriptSegment[] = [];
95 for (const segment of transcript) {
96 const normalizedSegment = normalizeTranscriptSegment(segment);
97 if (normalizedSegment) {
98 normalized.push(normalizedSegment);
99 }
100 }
101 return normalized;
102}
103
104function computeDuration(segments: TopicSegment[] = []): number {
105 return segments.reduce((total, segment) => {

Callers 2

AnalyzePageFunction · 0.90

Calls 1

Tested by

no test coverage detected