offmute-v2 0.0.1-opus.0 β 0.0.2
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 +67 -91
- package/dist/browser.browser.js +1149 -0
- package/dist/browser.browser.js.map +1 -0
- package/dist/browser.d.ts +437 -657
- package/dist/cli.cjs +2098 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.js +1903 -1361
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +2110 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +371 -0
- package/dist/index.d.ts +311 -453
- package/dist/index.js +1912 -1381
- package/dist/index.js.map +1 -1
- package/package.json +42 -34
- package/dist/browser.js +0 -1494
- package/dist/browser.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,120 +1,96 @@
|
|
|
1
|
-
# offmute-v2
|
|
1
|
+
# offmute-v2
|
|
2
2
|
|
|
3
|
-
**Timestamp-correct, diarized meeting transcription
|
|
3
|
+
**Timestamp-correct, diarized meeting transcription** β a video/audio file goes in; a
|
|
4
|
+
speaker-labelled, tone-annotated transcript with accurate timestamps comes out (SRT / Markdown /
|
|
5
|
+
JSON). It fuses a multimodal LLM (content, diarization, tone, speaker identity) with an ASR model
|
|
6
|
+
(word-level timing), aligned together. Runs as an npx CLI, a Node library, and in the browser.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
> π **Full write-up:** _"offmute-v2: GLM vs Opus"_ β **coming soon** at
|
|
9
|
+
> http://southbridge.ai/blog/offmute-v2-glm-vs-opus
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
export GEMINI_API_KEY=... # multimodal understanding
|
|
9
|
-
export ASSEMBLYAI_API_KEY=... # word-level timing
|
|
10
|
-
npx offmute-v2 meeting.mp4 -i "Two founders chatting; label them by name."
|
|
11
|
-
# β meeting.srt meeting.md meeting.json
|
|
12
|
-
```
|
|
11
|
+
---
|
|
13
12
|
|
|
14
|
-
##
|
|
13
|
+
## This repo is an agent-vs-agent experiment
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
offmute-v2 was built **twice, from a single identical prompt**, by two different models running in
|
|
16
|
+
**Claude Code** β as a head-to-head of how each does on a hard, AI-resistant build (combining the
|
|
17
|
+
ideas from [offmute], [meeting-diary], and [ipgu] into one timestamp-accurate diarizer):
|
|
17
18
|
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
19
|
+
| Branch | Built by | npm | What it is |
|
|
20
|
+
|--------|----------|-----|------------|
|
|
21
|
+
| [`glm`](../../tree/glm) | **GLM-5.2** | `offmute-v2@latest` / `@glm` | the **primary**, daily-driven build |
|
|
22
|
+
| [`opus`](../../tree/opus) | **Claude Opus 4.8** | `offmute-v2@opus` | the comparison build, preserved with full history |
|
|
23
|
+
| `master` | β | β | this overview + the current primary (tracks `glm` for now; may diverge) |
|
|
23
24
|
|
|
24
|
-
The
|
|
25
|
+
The two branches have **independent histories** β each is the full, unedited commit trail of that
|
|
26
|
+
model's build, including every review round and fix (so you can read exactly what happened).
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
## The receipts (per branch, in `docs/`)
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
Each build branch carries its own review trail:
|
|
29
31
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
32
|
+
- `docs/spec.md` β the plan & hypotheses
|
|
33
|
+
- `docs/review-1/` β first run-through review + the model's diagnosed fixes
|
|
34
|
+
- `docs/review-2/` β code-read + independent review + fixes
|
|
35
|
+
- `docs/comparison-response.md` (glm) / `docs/review-comparison-fixes.md` (opus) β each model's
|
|
36
|
+
response to the cross-model comparison
|
|
37
|
+
- `intermediates/process_log_*.md` β the model's append-only dev journal
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
Browse them on [`glm`](../../tree/glm/docs) and [`opus`](../../tree/opus/docs).
|
|
35
40
|
|
|
36
|
-
##
|
|
41
|
+
## Quick start
|
|
37
42
|
|
|
38
43
|
```bash
|
|
39
|
-
|
|
44
|
+
export GEMINI_API_KEY=... # multimodal transcription (or GOOGLE_API_KEY)
|
|
45
|
+
export ASSEMBLYAI_API_KEY=... # word-level timing
|
|
46
|
+
|
|
47
|
+
# primary (GLM) build:
|
|
48
|
+
npx offmute-v2@latest meeting.mp4
|
|
49
|
+
# explicitly pin a build:
|
|
50
|
+
npx offmute-v2@glm meeting.mp4
|
|
51
|
+
npx offmute-v2@opus meeting.mp4
|
|
40
52
|
```
|
|
41
53
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
| `-i, --instructions <text>` | β | guide speaker labelling/focus, e.g. "host is Alice; group callers as 'Caller'" |
|
|
45
|
-
| `-m, --model <model>` | `gemini-flash-latest` | LLM (e.g. `gemini-pro-latest` for max quality) |
|
|
46
|
-
| `--asr <provider>` | `assemblyai` | `assemblyai` or `none` (LLM-only timing, less precise) |
|
|
47
|
-
| `--no-video` | β | ignore the video track (audio only) |
|
|
48
|
-
| `--keyframes <n>` | `8` | video frames sampled for visual context |
|
|
49
|
-
| `--no-sub-segment` | β | keep whole speaker turns instead of subtitle-sized cues |
|
|
50
|
-
| `--no-identify` | β | skip the speaker name-resolution pass |
|
|
51
|
-
| `--thinking-level <lvl>` | `MINIMAL` | `MINIMAL\|LOW\|MEDIUM\|HIGH` (MINIMAL is best for transcription) |
|
|
52
|
-
| `-o, --out <dir>` | `.` | where to write outputs |
|
|
53
|
-
| `-f, --format <fmt>` | `all` | `srt \| md \| json \| all` |
|
|
54
|
-
| `--intermediates-dir <dir>` | `.offmute_<name>` | cache dir (resumable) |
|
|
55
|
-
| `--no-cache` | β | ignore cached intermediates |
|
|
56
|
-
|
|
57
|
-
Intermediates (extracted audio, ASR JSON, raw LLM output, keyframes) are saved and reused, so re-runs are cheap and interrupted runs resume.
|
|
58
|
-
|
|
59
|
-
## Library
|
|
54
|
+
As a library (this `master`/GLM line takes a single options object β `input` and `outputDir`
|
|
55
|
+
are required):
|
|
60
56
|
|
|
61
57
|
```ts
|
|
62
|
-
import { transcribe
|
|
63
|
-
|
|
64
|
-
const {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
import { transcribe } from "offmute-v2";
|
|
59
|
+
|
|
60
|
+
const { segments, speakers } = await transcribe({
|
|
61
|
+
input: "meeting.mp4",
|
|
62
|
+
outputDir: "./out",
|
|
63
|
+
model: "gemini-flash-latest", // or gemini-2.5-pro, gemini-3.1-pro-preview, β¦
|
|
64
|
+
formats: ["srt", "md", "json"],
|
|
65
|
+
// apiKeys: { gemini, assemblyai } // optional; falls back to env
|
|
68
66
|
});
|
|
69
|
-
|
|
70
|
-
console.log(transcript.speakers); // [{ id, label, named, description }]
|
|
71
|
-
console.log(transcript.segments[0]); // { start, end, speakerId, text, tone, ... }
|
|
72
67
|
```
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
Both branches publish the same `offmute-v2` CLI and library; they differ in pipeline internals (e.g.
|
|
70
|
+
GLM's ASR-backbone consistency + gap-fill, Opus's ownership-partition merge + voice-anchored
|
|
71
|
+
identify) and in the library call shape (the Opus build uses `transcribe(input, options)`). See each
|
|
72
|
+
branch's README and [`RELEASING.md`](RELEASING.md) for the `latest` / `glm` / `opus` npm tags.
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
## Build from source
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ffmpeg.wasm, call the providers over `fetch`, fuse with the pure core. You hand it a
|
|
82
|
-
loaded `@ffmpeg/ffmpeg` instance and your keys β one call does the rest (chunking and
|
|
83
|
-
all):
|
|
76
|
+
```bash
|
|
77
|
+
git clone https://github.com/SouthBridgeAI/offmute-v2.git
|
|
78
|
+
cd offmute-v2 && git checkout glm # or: opus
|
|
84
79
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const ffmpeg = new FFmpeg();
|
|
90
|
-
await ffmpeg.load();
|
|
91
|
-
|
|
92
|
-
const { srt, markdown, transcript } = await transcribeInBrowser(file /* File/Blob */, {
|
|
93
|
-
ffmpeg,
|
|
94
|
-
apiKeys: { gemini: GEMINI_KEY, assemblyai: ASSEMBLYAI_KEY }, // injected by the host
|
|
95
|
-
instructions: "Host is Alice; label callers as 'Caller'.",
|
|
96
|
-
useVideo: true,
|
|
97
|
-
onProgress: (e) => console.log(e.stage, e.message),
|
|
98
|
-
});
|
|
80
|
+
# glm build (npm): npm ci && npm run build && npm test
|
|
81
|
+
# opus build (bun): bun install && bun run build && bun test
|
|
82
|
+
node dist/cli.js --help # (glm CLI entry is dist/cli.cjs)
|
|
99
83
|
```
|
|
100
84
|
|
|
101
|
-
A runnable demo is in [`examples/browser/index.html`](examples/browser/index.html) (loads
|
|
102
|
-
ffmpeg.wasm from a CDN). Lower-level pieces (`GeminiFetchClient`, `transcribeWithAssemblyAIFetch`,
|
|
103
|
-
`extractAudioWasm`, and the pure `assembleTranscript`) are exported too β see
|
|
104
|
-
[`docs/BROWSER.md`](docs/BROWSER.md). The fetch providers are isomorphic, so they work in
|
|
105
|
-
Node 18+ as well.
|
|
106
|
-
|
|
107
85
|
## Requirements
|
|
86
|
+
- Node β₯ 20 and `ffmpeg`/`ffprobe` on PATH (CLI / library). Browser builds use ffmpeg.wasm.
|
|
87
|
+
- API keys from env or injected: `GEMINI_API_KEY` (or `GOOGLE_API_KEY`), `ASSEMBLYAI_API_KEY`;
|
|
88
|
+
optional `DEEPSEEK_API_KEY` / `GROQ_API_KEY` depending on the build/options.
|
|
108
89
|
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
## Diarization levels
|
|
113
|
-
|
|
114
|
-
1. **Separation** β who speaks when. 2. **Anonymous-consistent** β Speaker A/B, stable throughout. 3. **Identification** β real names from context. offmute-v2 targets **3**, with instruction-driven grouping (e.g. "everyone except the host is 'Audience'").
|
|
115
|
-
|
|
116
|
-
## Credits
|
|
117
|
-
|
|
118
|
-
Builds on three predecessors: **offmute** (multimodal describeβtranscribe, tone), **ipgu** (chunk/merge discipline, timestamp validation), **meeting-diary** (ASR word-timestamps + diarization). Created by [Southbridge](https://southbridge.ai).
|
|
90
|
+
## License
|
|
91
|
+
Apache-2.0. Built on [offmute], [meeting-diary], and [ipgu]. Credit to the model teams β including
|
|
92
|
+
[z.ai](https://z.ai) for GLM-5.2.
|
|
119
93
|
|
|
120
|
-
|
|
94
|
+
[offmute]: https://github.com/southbridgeai/offmute
|
|
95
|
+
[meeting-diary]: https://github.com/southbridgeai/meeting-diary
|
|
96
|
+
[ipgu]: https://github.com/hrishioa/ipgu
|