offmute-v2 0.0.4 → 0.1.0
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/README.md +233 -211
- package/dist/browser.browser.js +471 -82
- package/dist/browser.browser.js.map +1 -1
- package/dist/browser.d.ts +31 -7
- package/dist/cli.js +3044 -369
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1797 -170
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -11
- package/dist/index.d.ts +73 -11
- package/dist/index.js +1805 -174
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
- package/dist/cli.cjs +0 -2100
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.d.cts +0 -1
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
|
|
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 (≤
|
|
425
|
-
*
|
|
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
|
-
/**
|
|
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;
|