offmute-v2 0.0.5 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -155,6 +155,18 @@ interface TranscriptMetadata {
155
155
  processedAt: string;
156
156
  models: Record<string, string>;
157
157
  passes: string[];
158
+ /** Wall-clock processing time (ms). */
159
+ wallMs?: number;
160
+ /** Cost accounting for this run (list-price estimates, see pricing.ts). */
161
+ cost?: {
162
+ estimatedUsd: number;
163
+ actualUsd: number;
164
+ pricesAsOf: string;
165
+ lines: string[];
166
+ llmCalls: number;
167
+ inputTokens: number;
168
+ outputTokens: number;
169
+ };
158
170
  }
159
171
 
160
172
  /**
@@ -258,7 +270,7 @@ declare const TRANSCRIPT_SCHEMA: {
258
270
  readonly items: {
259
271
  readonly type: "STRING";
260
272
  };
261
- readonly description: "Tone/behavior tags e.g. hesitant, laughing, contemplating, urgent, sarcastic. Empty array if neutral.";
273
+ readonly description: "Tone tags ONLY when something clearly stands out (laughing, sarcastic, agitated, whispering). Empty array for normal speech — most segments.";
262
274
  };
263
275
  };
264
276
  readonly required: readonly ["speaker", "start", "end", "text"];
@@ -399,7 +411,7 @@ interface IdentifyResult {
399
411
  reasoning: string;
400
412
  }
401
413
  /** Identify speakers via a text reasoner. Returns a name map (speaker id → name). */
402
- declare function identifySpeakers(client: OpenAICompatClient, model: string, segments: IdentifySegment[], speakers: SpeakerInfo[], roster: string, knownSpeakers?: string[]): Promise<IdentifyResult>;
414
+ declare function identifySpeakers(client: OpenAICompatClient, model: string, segments: IdentifySegment[], speakers: SpeakerInfo[], roster: string, knownSpeakers?: string[], nameHints?: Record<string, string>, sourceFileName?: string): Promise<IdentifyResult>;
403
415
 
404
416
  /**
405
417
  * Finalize: dedup chunk-overlap duplicates, fix timestamp overlaps, clamp durations,
@@ -418,24 +430,36 @@ interface FinalizeOptions {
418
430
  declare function finalizeSegments(segments: AlignedSegment[], opts?: FinalizeOptions): Segment[];
419
431
 
420
432
  /**
421
- * Output formatting: diarized SRT (with tone), Markdown transcript, and JSON.
433
+ * Output formatting: diarized SRT (with tone), Markdown transcript, plain text, and JSON.
434
+ *
435
+ * Markdown ships in two styles:
436
+ * - "merged" (default): consecutive same-speaker segments join into one paragraph —
437
+ * the formatting that reads best over long transcripts. Merging happens HERE, in the
438
+ * formatter only; the underlying segments are never merged (measured WER regression
439
+ * when segments were merged upstream — boundary words duplicate).
440
+ * - "turns": one block per segment (the previous default), useful when you want the
441
+ * fine-grained turn structure visible.
422
442
  *
423
443
  * SRT breaking (spec §5): each finalized segment is one speaker turn. Long turns are
424
- * split into readable blocks (≤ maxChars / ≤ maxSec) using per-word timing so block
425
- * boundaries stay time-accurate. The speaker label prefixes each block.
444
+ * split into readable blocks (≤ MAX_CHARS / ≤ MAX_BLOCK_SEC) using per-word timing when
445
+ * available, or proportional timing otherwise — so no cue is ever "too thick to read".
426
446
  */
427
447
 
428
448
  interface FormatOptions {
429
449
  /** Prefix each SRT block with "Speaker: ". Default true. */
430
450
  labelSpeakers?: boolean;
431
- /** Append "(tone)" to blocks that have tone tags. Default true. */
451
+ /** Show "(tone)" annotations. Default true. */
432
452
  showTone?: boolean;
433
453
  /** Title for the markdown transcript. */
434
454
  title?: string;
455
+ /** Markdown layout: merged same-speaker paragraphs (default) or one block per turn. */
456
+ mdStyle?: "merged" | "turns";
457
+ /** Include [mm:ss] timestamps in markdown/text. Default true. */
458
+ timestamps?: boolean;
435
459
  }
436
460
  /** Format the transcript as a diarized SRT. */
437
461
  declare function formatSrt(result: TranscriptResult, opts?: FormatOptions): string;
438
- /** Format as a readable markdown transcript. */
462
+ /** Format as a readable markdown transcript (merged paragraphs by default). */
439
463
  declare function formatMarkdown(result: TranscriptResult, opts?: FormatOptions): string;
440
464
  /** Format as JSON (full structured result). */
441
465
  declare function formatJson(result: TranscriptResult): string;