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

Function formatTranscriptWithTimestamps

lib/ai-processing.ts:642–650  ·  view source on GitHub ↗
(segments: TranscriptSegment[])

Source from the content-addressed store, hash-verified

640}
641
642function formatTranscriptWithTimestamps(segments: TranscriptSegment[]): string {
643 return segments
644 .map((s) => {
645 const startTime = formatTime(s.start);
646 const endTime = formatTime(s.start + s.duration);
647 return `[${startTime}-${endTime}] ${s.text}`;
648 })
649 .join('\n');
650}
651
652function formatTime(seconds: number): string {
653 const mins = Math.floor(seconds / 60);

Calls 1

formatTimeFunction · 0.70

Tested by

no test coverage detected