/** One timestamped word from a `verbose_json` transcription (`timestamp_granularities` includes "word"). */ export interface DiarizedWord { word: string; start: number; end: number; speaker: number; } interface SpanCarrier { start: number; end: number; text: string; } /** True when at least half of the segments have a real span; an empty list is fine (nothing to place). */ export declare function hasSegmentSpans(segments: ReadonlyArray>): boolean; /** * Rebuilds segment spans from the word stream. * * Azure's diarization path (via OpenRouter, `microsoft/mai-transcribe-2`) * sometimes returns every SEGMENT with `start = end = 0` while the WORDS of the * same response keep their timestamps. The segments' text is the words joined * in order, so walking the word list by each segment's word count recovers the * spans exactly. When the counts disagree (a word split differently by the * two views), the words are shared out proportionally instead, which keeps * every segment on the timeline in the right order even if a boundary drifts * by a word. */ export declare function spansFromWords(segments: T[], words: DiarizedWord[]): T[]; export {}; //# sourceMappingURL=diarization-spans.d.ts.map