(seconds: number)
| 32 | } |
| 33 | |
| 34 | function formatSrtTimestamp(seconds: number): string { |
| 35 | const totalMilliseconds = Math.max(0, Math.round(seconds * 1000)); |
| 36 | const hours = Math.floor(totalMilliseconds / 3_600_000); |
| 37 | const minutes = Math.floor((totalMilliseconds % 3_600_000) / 60_000); |
| 38 | const secs = Math.floor((totalMilliseconds % 60_000) / 1000); |
| 39 | const millis = totalMilliseconds % 1000; |
| 40 | |
| 41 | return `${hours.toString().padStart(2, '0')}:${minutes |
| 42 | .toString() |
| 43 | .padStart(2, '0')}:${secs.toString().padStart(2, '0')},${millis |
| 44 | .toString() |
| 45 | .padStart(3, '0')}`; |
| 46 | } |
| 47 | |
| 48 | function getSegmentSpeaker(segment: TranscriptSegment): string | undefined { |
| 49 | if (!segment) return undefined; |
no outgoing calls
no test coverage detected