offmute-v2 0.0.5 β 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 +231 -214
- 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 +2973 -350
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1740 -163
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -9
- package/dist/index.d.ts +71 -9
- package/dist/index.js +1740 -159
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
- package/dist/cli.cjs +0 -2152
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.d.cts +0 -1
package/README.md
CHANGED
|
@@ -1,293 +1,310 @@
|
|
|
1
|
+
<!-- prettier-ignore-start -->
|
|
1
2
|
<div align="center">
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
<img src="https://raw.githubusercontent.com/SouthBridgeAI/offmute-v2/master/docs/assets/mascot.png" alt="offmute β a frog that listens carefully" width="460">
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
# offmute-v2
|
|
6
7
|
|
|
7
|
-
**
|
|
8
|
-
|
|
9
|
-
speaker's name (when it can be inferred) and their tone β as **SRT**, **Markdown**, and **JSON**.
|
|
8
|
+
**State-of-the-art meeting transcription.**<br>
|
|
9
|
+
Every word on the right millisecond. Every speaker told apart β and named.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
[](LICENSE)
|
|
13
|
-
[](#requirements)
|
|
11
|
+
<br>
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npx offmute-v2 meeting.mp4
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
[](https://www.npmjs.com/package/offmute-v2)
|
|
18
|
+
[](LICENSE)
|
|
19
|
+
[](#requirements)
|
|
20
|
+
[](#the-story)
|
|
21
|
+
|
|
22
|
+
**[Quick start](#quick-start)** Β· **[What you get](#what-you-get)** Β· **[Why it's accurate](#why-its-accurate)** Β· **[Daemon](#daemon-mode)** Β· **[Costs](#costs-you-can-see)** Β· **[CLI](#cli-reference)** Β· **[Library](#library)** Β· **[The story](#the-story)**
|
|
17
23
|
|
|
18
24
|
</div>
|
|
25
|
+
<!-- prettier-ignore-end -->
|
|
19
26
|
|
|
20
27
|
---
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+
<img src="https://raw.githubusercontent.com/SouthBridgeAI/offmute-v2/master/docs/assets/whos-speaking.png" alt='Iron Man: "Who's speaking?" β Ant-Man, inside the suit: "It's your conscience. We don't talk a lot these days."' width="440">
|
|
32
|
+
|
|
33
|
+
_the eternal diarization problem β Tony had **one** unknown speaker and an AI in his helmet, and still needed help_
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
Speech-to-text is a solved problem. _Meetings_ are not: who said what, through interruptions,
|
|
38
|
+
across an hour, with names attached and timestamps you can trust. Every tool picks one half β
|
|
39
|
+
ASR services nail the clock but garble the people; LLMs understand the people but
|
|
40
|
+
[hallucinate the clock](#why-its-accurate). offmute-v2 runs both and fuses them, word by word.
|
|
41
|
+
|
|
42
|
+
The result: **best-in-class WER, ~99% speaker attribution, sub-second turn boundaries** on
|
|
43
|
+
hand-checked real recordings β with speakers identified _by name_ from context alone, and every
|
|
44
|
+
name verified by a second model before it ships.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
26
47
|
|
|
27
48
|
```bash
|
|
28
|
-
export GEMINI_API_KEY=... #
|
|
29
|
-
export ASSEMBLYAI_API_KEY=... #
|
|
49
|
+
export GEMINI_API_KEY=... # the ears (aistudio.google.com/apikey)
|
|
50
|
+
export ASSEMBLYAI_API_KEY=... # the clock (assemblyai.com β $0.15/hr)
|
|
30
51
|
|
|
31
|
-
npx offmute-v2 meeting.mp4
|
|
32
|
-
# β meeting.md
|
|
52
|
+
npx offmute-v2 meeting.mp4
|
|
53
|
+
# β meeting.md, right next to meeting.mp4
|
|
33
54
|
```
|
|
34
55
|
|
|
35
|
-
That's
|
|
36
|
-
|
|
37
|
-
## What you get
|
|
56
|
+
That's the whole thing. First run checks your setup and tells you what any missing keys would
|
|
57
|
+
unlock. Every run shows you what it will cost before spending, and what it spent after:
|
|
38
58
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
SubRip subtitles and JSON. The same content, three ways:
|
|
59
|
+
```text
|
|
60
|
+
offmute-v2 0.1.0 team-call.mp4
|
|
42
61
|
|
|
43
|
-
|
|
62
|
+
estimate ~$0.30 [gemini-3.1-pro-preview: 4 chunks + describe β $0.22 Β· assemblyai: 28min β $0.07 Β· β¦]
|
|
63
|
+
β preparing media Β· extracting keyframes 28s
|
|
64
|
+
β listening for context 41s
|
|
65
|
+
β transcribing 3/3 chunks 38s
|
|
66
|
+
β timestamps (AssemblyAI) Β· 154 utterances, 5813 words, 2 speakers 23s
|
|
67
|
+
β aligning timestamps Β· split 3 mixed-voice boundaries 0s
|
|
68
|
+
β resolving speakers 0s
|
|
69
|
+
β identified 3 speakers: {"Speaker A":"Hrishi","Speaker B":"Chibi","Speaker C":"Daniel"}
|
|
70
|
+
β naming speakers (deepseek-chat + gemini-flash-latest second opinion) 12s
|
|
71
|
+
β finalizing Β· 65 segments 0s
|
|
72
|
+
receipt 6 LLM calls Β· 63k in / 12k out Β· ~$0.32 Β· 2m49s
|
|
44
73
|
|
|
45
|
-
|
|
46
|
-
1
|
|
47
|
-
00:00:00,160 --> 00:00:00,720
|
|
48
|
-
Speaker D: GPU
|
|
74
|
+
β /Users/you/team-call.md
|
|
49
75
|
|
|
50
|
-
|
|
51
|
-
00:00:01,199 --> 00:00:05,440
|
|
52
|
-
Presenter: And I'm inspired. I think I'm going to apply to NTU this fall. (confident, joking)
|
|
76
|
+
65 segments Β· 3 speakers Β· 23m of audio Β· ~$0.32 Β· 2m 49s
|
|
53
77
|
```
|
|
54
78
|
|
|
55
|
-
|
|
79
|
+
## What you get
|
|
56
80
|
|
|
57
|
-
|
|
58
|
-
_Duration: 1914s Β· Speakers: 5_
|
|
81
|
+
A transcript that reads like a person took minutes, timed like a machine kept the clock:
|
|
59
82
|
|
|
83
|
+
```markdown
|
|
60
84
|
## Speakers
|
|
61
85
|
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
86
|
+
- **Hanjun Kim** β 4m 37s
|
|
87
|
+
- **Ang Li** β 6m 30s
|
|
88
|
+
- **Moderator** β 5m 30s
|
|
64
89
|
|
|
65
90
|
## Transcript
|
|
66
91
|
|
|
67
|
-
[00:
|
|
68
|
-
|
|
92
|
+
`[00:32]` **Hayden Salmon:** I said 25%. I was wrong.
|
|
93
|
+
|
|
94
|
+
`[00:35]` **Ang Li:** I said 5%.
|
|
95
|
+
|
|
96
|
+
`[00:46]` **Hanjun Kim:** Hey everybody. I'm Hanjun Kim. I'm a strategy professor at INSEAD,
|
|
97
|
+
and I study how the economics of building, scaling, and designing companies are changing with AI.
|
|
69
98
|
```
|
|
70
99
|
|
|
71
|
-
|
|
72
|
-
|
|
100
|
+
Same-speaker runs merge into readable paragraphs; tone shows up only when it matters
|
|
101
|
+
(_(laughing)_, _(sarcastic)_) instead of decorating every line. One file by default; five formats
|
|
102
|
+
when you want them:
|
|
103
|
+
|
|
104
|
+
| format | what it's for |
|
|
105
|
+
| ---------------- | ---------------------------------------------------------------------------------------- |
|
|
106
|
+
| `md` _(default)_ | the transcript you actually read β merged paragraphs, `[mm:ss]` anchors |
|
|
107
|
+
| `srt` | subtitles β cue width capped, timing word-accurate, drop straight onto the video |
|
|
108
|
+
| `html` | one self-contained shareable page β speaker colors, click-to-copy timestamps, no JS deps |
|
|
109
|
+
| `txt` | plain text for grepping and piping |
|
|
110
|
+
| `json` | every segment with `start`/`end`, speaker, tone, confidence, word-level timings |
|
|
111
|
+
|
|
112
|
+
Add `--summary` for a `meeting.summary.md` with the TL;DR, decisions, and action items.
|
|
73
113
|
|
|
74
114
|
## Why it's accurate
|
|
75
115
|
|
|
76
|
-
LLMs are
|
|
77
|
-
|
|
78
|
-
|
|
116
|
+
Multimodal LLMs are the best diarizers in the world β they follow speakers through
|
|
117
|
+
interruptions, infer names from "hey everybody, I'm Hanjun", and hear tone. They are also
|
|
118
|
+
_hopeless_ at time: left alone, Gemini's timestamps drift **minutes** over a long recording.
|
|
119
|
+
ASR services are the mirror image: word timings accurate to centiseconds, but speakers as
|
|
120
|
+
anonymous clusters and text that keeps every "um".
|
|
79
121
|
|
|
80
|
-
|
|
81
|
-
| ------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------- |
|
|
82
|
-
| **WHO / HOW** β speakers, names, tone, hard audio | multimodal **LLM** (Gemini) | infers names from context, hears tone, handles crowds & interruptions |
|
|
83
|
-
| **WHEN** β word-level timestamps | **ASR** (AssemblyAI / Groq Whisper) | sub-second accurate; LLM timestamps drift _minutes_ over a long file |
|
|
84
|
-
| **fuse** | edit-distance **alignment** | transfers the ASR's clock onto the LLM's richer words |
|
|
122
|
+
So each does the half it's the best in the world at:
|
|
85
123
|
|
|
86
124
|
```mermaid
|
|
87
125
|
flowchart LR
|
|
88
126
|
IN["π¬ audio / video"] --> PRE["preprocess<br/>16kHz mono + keyframes"]
|
|
89
|
-
PRE --> LLM["multimodal LLM<br/>
|
|
90
|
-
PRE --> ASR["ASR<br/>word-level
|
|
91
|
-
LLM --> AL["
|
|
127
|
+
PRE --> LLM["multimodal LLM<br/>words Β· speakers Β· tone<br/><i>(chunked, concurrent)</i>"]
|
|
128
|
+
PRE --> ASR["ASR<br/>word-level clock<br/><i>(whole file)</i>"]
|
|
129
|
+
LLM --> AL["alignment<br/>one edit-distance pass"]
|
|
92
130
|
ASR --> AL
|
|
93
|
-
AL -->
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
131
|
+
AL --> POST["gap-fill Β· mixed-voice splits<br/>speaker resolution"]
|
|
132
|
+
POST --> ID["name verification<br/><i>(two models + evidence checks)</i>"]
|
|
133
|
+
ID --> OUT["md Β· srt Β· html Β· txt Β· json"]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The fuse is a [NeedlemanβWunsch](https://en.wikipedia.org/wiki/Needleman%E2%80%93Wunsch_algorithm)
|
|
137
|
+
alignment over the two word streams β the LLM's text inherits the ASR's clock. Around that core,
|
|
138
|
+
the seams that actually determine day-to-day quality:
|
|
139
|
+
|
|
140
|
+
- **Names shown are names verified.** Two different reasoner models read the full transcript and
|
|
141
|
+
name the speakers independently. They must agree β or produce an evidence quote that actually
|
|
142
|
+
appears in the transcript. A stated self-introduction outranks both; an unresolvable
|
|
143
|
+
disagreement stays an honest `Speaker A` rather than becoming a confident guess. One person
|
|
144
|
+
can never be two voices.
|
|
145
|
+
- **Conversation partners never merge.** ASR diarizers over-split one voice into two clusters;
|
|
146
|
+
naive fixes merge them back by label β and fuse two _real people_ when the LLM mislabels.
|
|
147
|
+
offmute-v2 checks the turn-taking pattern: clusters that alternate like a conversation are
|
|
148
|
+
different humans, whatever the labels say.
|
|
149
|
+
- **Mega-segments get split at voice boundaries.** When the LLM folds someone's interjection
|
|
150
|
+
into another speaker's turn, word-level timing exposes the foreign voice and the segment is
|
|
151
|
+
split at the exact word.
|
|
152
|
+
- **Chunk seams never double-print.** Segments are ownership-partitioned across chunk overlaps,
|
|
153
|
+
and boundary-spanning duplicates are trimmed word-by-word.
|
|
154
|
+
- **Nothing silently goes stale.** Every stage caches to disk, keyed on the input file _and_ the
|
|
155
|
+
config β change the model and the cache invalidates itself. Re-run for a new format and it's
|
|
156
|
+
~2 seconds and $0.00. Kill it mid-run and it resumes where it stopped.
|
|
157
|
+
|
|
158
|
+
Measured on a hand-checked 32-minute talk with audience Q&A: **β8% WER, ~99% word-level speaker
|
|
159
|
+
attribution, first cue within 40ms of reference.** Receipts, methodology, and an independent
|
|
160
|
+
re-score live in `[docs/](https://github.com/SouthBridgeAI/offmute-v2/tree/fable/docs)` and the
|
|
161
|
+
[write-up](https://southbridge.ai/blog/offmute-v2-glm-vs-opus).
|
|
162
|
+
|
|
163
|
+
## Daemon mode
|
|
164
|
+
|
|
165
|
+
Point it at the folder your recorder drops files into, and stop thinking about it:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
offmute-v2 watch ~/Recordings --summary
|
|
97
169
|
```
|
|
98
170
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
##
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
- π **Fully inspectable** β every LLM prompt+response is logged to `llm-calls.jsonl`; all
|
|
121
|
-
intermediates are plain JSON.
|
|
122
|
-
|
|
123
|
-
## Usage
|
|
124
|
-
|
|
125
|
-
### CLI
|
|
171
|
+
- waits for files to finish copying before starting (size-stability check)
|
|
172
|
+
- never reprocesses a finished file, across restarts β killed jobs resume from cache
|
|
173
|
+
- OS notification when each transcript lands
|
|
174
|
+
- `--jobs N` to run several at once, `--no-backlog` to skip what's already there
|
|
175
|
+
|
|
176
|
+
## Costs you can see
|
|
177
|
+
|
|
178
|
+
An honest tool tells you what it's about to spend:
|
|
179
|
+
|
|
180
|
+
- **estimate before any paid call** β duration-based, per provider, printed up front
|
|
181
|
+
- **itemized receipt after** β real token counts, per model, embedded in the JSON metadata too
|
|
182
|
+
- **lifetime accounting** β `offmute-v2 stats` shows hours processed, characters produced, and
|
|
183
|
+
cost by model, accumulated in `~/.offmute`
|
|
184
|
+
|
|
185
|
+
Typical numbers: a 30-minute meeting on the default (best) model runs β **$0.30β0.45**;
|
|
186
|
+
`--model gemini-3.5-flash` cuts that ~4Γ with quality that holds up remarkably well.
|
|
187
|
+
|
|
188
|
+
## Fix a name in two seconds
|
|
189
|
+
|
|
190
|
+
The models only have the audio β if nobody says their own name, you'll get an honest
|
|
191
|
+
`Speaker A`. Fixing it doesn't cost a re-run:
|
|
126
192
|
|
|
127
193
|
```bash
|
|
128
|
-
|
|
194
|
+
offmute-v2 rename meeting.mp4 "Speaker A=Priya" "Speaker B=Jay"
|
|
129
195
|
```
|
|
130
196
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
| `--level <1\|2\|3>` | `2` | 1 = separation Β· 2 = stable anon Β· 3 = identify names |
|
|
137
|
-
| `--timestamped <p>` | `assemblyai` | timing provider: `assemblyai` Β· `whisper-groq` Β· `none` |
|
|
138
|
-
| `--reasoner <name>` | `deepseek-chat` | text model for the name-identification pass (level 3) |
|
|
139
|
-
| `--chunk-seconds <n>` | `600` | chunk length Β· `--overlap-seconds` (default `60`) |
|
|
140
|
-
| `--formats <list>` | `md` | which outputs to write (`srt`, `md`, `json`) |
|
|
141
|
-
| `--passes <list>` | all | run/resume a subset of stages |
|
|
142
|
-
| `--force` | β | ignore caches and recompute |
|
|
143
|
-
| `--only-chunk <n>` | β | process a single chunk (debugging) |
|
|
144
|
-
| `-i, --intermediates <dir>` | auto | cache dir (auto-derived per input) |
|
|
197
|
+
It finds the run's cache, applies the names, regenerates the outputs, and remembers the fix for
|
|
198
|
+
future re-runs. Or tell it who was in the room up front: `--speakers "Priya,Jay"` β if one known
|
|
199
|
+
name is left over and one voice unnamed, they bind by elimination.
|
|
200
|
+
|
|
201
|
+
## CLI reference
|
|
145
202
|
|
|
146
203
|
```bash
|
|
147
|
-
|
|
148
|
-
npx offmute-v2 meeting.mp4 --model gemini-2.5-pro # higher quality
|
|
149
|
-
npx offmute-v2 talk.mov --timestamped whisper-groq # free/fast timing, no AssemblyAI
|
|
150
|
-
npx offmute-v2 meeting.mp4 --passes align,consistency,finalize # resume from cache
|
|
204
|
+
offmute-v2 <input> [options] # transcribe (default command)
|
|
151
205
|
```
|
|
152
206
|
|
|
153
|
-
|
|
207
|
+
| option | default | |
|
|
208
|
+
| --------------------------------------- | ------------------------ | --------------------------------------------------------------- | --- | ------------------------------------------------------------ |
|
|
209
|
+
| `-o, --output <dir>` | next to input | where transcripts land |
|
|
210
|
+
| `--formats <list>` | `md` | any of `md,srt,txt,html,json` |
|
|
211
|
+
| `--summary` | off | also write TL;DR / decisions / action items |
|
|
212
|
+
| `--instructions <text>` | β | guide the ear: _"the host is Alice; spell it Xiao, not Shao"_ |
|
|
213
|
+
| `--speakers <names>` | β | who was in the room (helps naming; comma-separated) |
|
|
214
|
+
| `--model <name>` | `gemini-3.1-pro-preview` | `gemini-3.5-flash` for ~4Γ cheaper/faster |
|
|
215
|
+
| `--timestamped <p>` | `assemblyai` | `elevenlabs` (Scribe v2) Β· `whisper-groq` (free) Β· `none` |
|
|
216
|
+
| `--reasoner <name>` | `deepseek-chat` | naming/summary model β DeepSeek, Gemini, GLM, Kimi, GPT, Claude |
|
|
217
|
+
| `--level <1 | 2 | 3>` | `3` | 1 separation Β· 2 anonymous-consistent Β· 3 **verified names** |
|
|
218
|
+
| `--identify <mode>` | `dual` | two reasoners + adjudication Β· `single` |
|
|
219
|
+
| `--md-style <s>` | `merged` | merged paragraphs Β· `turns` for one block per turn |
|
|
220
|
+
| `--chunk-seconds` / `--overlap-seconds` | `600` / `60` | chunking |
|
|
221
|
+
| `--force` | β | ignore caches and recompute |
|
|
222
|
+
| `-i <dir>` | OS temp, per input | cache location (printed each run) |
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
offmute-v2 watch <dir> # daemon: transcribe files as they appear
|
|
226
|
+
offmute-v2 rename <file> "Old=New" # retcon speaker names from the run cache
|
|
227
|
+
offmute-v2 models # what each role can use + what your keys unlock
|
|
228
|
+
offmute-v2 doctor # ffmpeg + keys + live API health check
|
|
229
|
+
offmute-v2 stats # lifetime hours, characters, cost by model
|
|
230
|
+
```
|
|
154
231
|
|
|
155
|
-
|
|
156
|
-
the input file's folder and `formats` defaults to `["md"]`:
|
|
232
|
+
## Library
|
|
157
233
|
|
|
158
234
|
```ts
|
|
159
235
|
import { transcribe } from "offmute-v2";
|
|
160
236
|
|
|
161
237
|
const { segments, speakers, metadata } = await transcribe({
|
|
162
238
|
input: "meeting.mp4",
|
|
163
|
-
|
|
164
|
-
model: "gemini-flash-latest",
|
|
165
|
-
level: 3,
|
|
239
|
+
formats: ["md", "json"],
|
|
166
240
|
instructions: "Three-person panel; label by name.",
|
|
167
|
-
|
|
168
|
-
apiKeys: { gemini: "...", assemblyai: "..." }, // optional; falls back to env
|
|
241
|
+
apiKeys: { gemini: "...", assemblyai: "..." }, // optional β falls back to env
|
|
169
242
|
});
|
|
170
243
|
|
|
171
|
-
console.log(segments[0]);
|
|
244
|
+
console.log(segments[0]);
|
|
245
|
+
// { start: 0.16, end: 4.2, speaker: "Speaker A", speakerName: "Hanjun Kim",
|
|
246
|
+
// text: "...", tone: ["laughing"], confidence: 0.97, words: [...] }
|
|
247
|
+
console.log(metadata.cost); // { estimatedUsd, actualUsd, lines, ... }
|
|
172
248
|
```
|
|
173
249
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
### Browser
|
|
178
|
-
|
|
179
|
-
The fusion core (align / consistency / identify / finalize / format) is pure TypeScript with **zero
|
|
180
|
-
node-only imports**, so it bundles tiny and runs in the browser via `offmute-v2/browser` β using
|
|
181
|
-
`fetch`-based providers and `ffmpeg.wasm` for in-browser audio extraction. See
|
|
182
|
-
[`docs/`](#receipts--how-this-repo-was-built) / the browser example for the integration seam.
|
|
183
|
-
|
|
184
|
-
## How it works
|
|
185
|
-
|
|
186
|
-
A multi-stage pipeline where each stage persists a JSON intermediate (so it's resumable and
|
|
187
|
-
debuggable):
|
|
188
|
-
|
|
189
|
-
1. **preprocess** β ffmpeg β compact mono 16 kHz **mp3** + scene-aware keyframes (a 9.6 GB `.mov`
|
|
190
|
-
becomes a few MB of audio in seconds β transparent for speech, but a fraction of lossless size).
|
|
191
|
-
2. **describe** β a quick multimodal pass builds a meeting summary + speaker roster to prime
|
|
192
|
-
transcription.
|
|
193
|
-
3. **llm-transcribe** β each chunk goes to the LLM for verbatim text, diarization, and tone. Output
|
|
194
|
-
is plain text with coarse `mm:ss` markers, parsed leniently (truncated text degrades gracefully
|
|
195
|
-
where truncated JSON would be unrecoverable β a lesson from [ipgu](#credits)).
|
|
196
|
-
4. **timestamped** β the whole file goes to ASR for word-level timing + a speaker backbone.
|
|
197
|
-
5. **align** β the heart: the LLM's token stream is aligned against the ASR word stream with a
|
|
198
|
-
NeedlemanβWunsch edit-distance DP, transferring accurate word times onto the richer LLM text.
|
|
199
|
-
6. **gap-fill** β anywhere ASR heard speech that no LLM segment covers, an ASR fallback is inserted
|
|
200
|
-
so nothing is dropped.
|
|
201
|
-
7. **consistency** β the ASR voice clusters act as a global backbone, merging the LLM's per-chunk
|
|
202
|
-
labels into stable speakers (and fixing ASR over-splits).
|
|
203
|
-
8. **identify** _(level 3)_ β a reasoning model maps `Speaker A` β real names using context + a
|
|
204
|
-
voice-cluster hint.
|
|
205
|
-
9. **finalize** β overlap fixes, clamping, readable subtitle-sized blocks, and SRT/MD/JSON.
|
|
206
|
-
|
|
207
|
-
> [!NOTE]
|
|
208
|
-
> The hard parts of this problem are **chunk overlap** and **alignment**. offmute-v2 partitions
|
|
209
|
-
> overlap by _ownership_ (each word is emitted by exactly one chunk) so sentences are never
|
|
210
|
-
> double-printed at seams, and aligns the _whole_ chunk in one DP pass so common words like "it"
|
|
211
|
-
> can't mis-match to a later occurrence.
|
|
212
|
-
|
|
213
|
-
## Built twice, in the open: GLM vs Opus
|
|
214
|
-
|
|
215
|
-
This repo is also an **agent-vs-agent experiment**. offmute-v2 was built **twice, from one identical
|
|
216
|
-
prompt**, by two different models running in **Claude Code** β a head-to-head on a hard,
|
|
217
|
-
AI-resistant build (fusing the ideas of [offmute], [meeting-diary], and [ipgu] into one
|
|
218
|
-
timestamp-accurate diarizer):
|
|
219
|
-
|
|
220
|
-
| Branch | Built by | npm tag | What it is |
|
|
221
|
-
| ----------------------------- | ---------------------------- | ------------------- | ---------------------------------------------- |
|
|
222
|
-
| [`master`](../../tree/master) | GLM line + post-launch fixes | `offmute-v2@latest` | the daily-driven, hardened build (this README) |
|
|
223
|
-
| [`glm`](../../tree/glm) | **GLM-5.2** | `offmute-v2@glm` | the frozen GLM experiment build |
|
|
224
|
-
| [`opus`](../../tree/opus) | **Claude Opus 4.8** | `offmute-v2@opus` | the frozen Opus experiment build |
|
|
250
|
+
Every pipeline stage (`alignSegments`, `assignGlobalSpeakers`, `identifySpeakersV2`, the
|
|
251
|
+
formatters) is exported individually β bring your own pipeline if you like. A browser build of
|
|
252
|
+
the pure fusion core ships as `offmute-v2/browser` (fetch providers + optional ffmpeg.wasm).
|
|
225
253
|
|
|
226
|
-
|
|
227
|
-
npx offmute-v2@glm meeting.mp4 # the GLM build, exactly as submitted
|
|
228
|
-
npx offmute-v2@opus meeting.mp4 # the Opus build, exactly as submitted
|
|
229
|
-
```
|
|
254
|
+
## What can go wrong (honestly)
|
|
230
255
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
256
|
+
- **Two similar voices, nobody says a name** β you get correct turn-taking with `Speaker A/B`
|
|
257
|
+
labels, not a confident wrong guess. That's by design; `rename` or `--speakers` closes the gap.
|
|
258
|
+
- **Heard names get spelled by ear** β "Hanjun" may render as "Hanjin" between runs. The
|
|
259
|
+
recording's filename and your `--instructions` both feed the namer; `rename` fixes stragglers.
|
|
260
|
+
- **Network blips** β every upload retries with backoff for ~90s; if a run still dies, re-running
|
|
261
|
+
resumes from cache and re-pays nothing that finished.
|
|
262
|
+
- **It costs money** β roughly a dollar an hour of audio on the best models, a quarter of that on
|
|
263
|
+
flash. The estimate prints before anything is spent.
|
|
235
264
|
|
|
236
|
-
##
|
|
265
|
+
## Requirements
|
|
237
266
|
|
|
238
|
-
|
|
267
|
+
- **Node β₯ 20** and **ffmpeg** in PATH (`brew install ffmpeg` / `apt install ffmpeg`)
|
|
268
|
+
- `GEMINI_API_KEY` (or `GOOGLE_API_KEY`) β required, the ears
|
|
269
|
+
- One clock, strongly recommended: `ASSEMBLYAI_API_KEY` (default) Β· `ELEVENLABS_API_KEY`
|
|
270
|
+
(Scribe v2 β the sharpest diarization we've tested) Β· `GROQ_API_KEY` (free whisper timing)
|
|
271
|
+
- Nice-to-have: `DEEPSEEK_API_KEY` β makes speaker naming cost ~$0.003 a run
|
|
239
272
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
review, and each model's diagnosed fixes), and the append-only `intermediates/process_log_*.md`
|
|
243
|
-
dev journals.
|
|
244
|
-
- **Releasing & npm tags:** [`RELEASING.md`](RELEASING.md) β published via GitHub Actions **npm
|
|
245
|
-
Trusted Publishing (OIDC)**, no tokens, with provenance.
|
|
273
|
+
Keys can also be injected via the library API instead of the environment. Run
|
|
274
|
+
`offmute-v2 doctor` to see where you stand.
|
|
246
275
|
|
|
247
|
-
##
|
|
276
|
+
## The story
|
|
248
277
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
278
|
+
This repo is an experiment receipt as much as a tool. The same brief β fuse
|
|
279
|
+
[offmute](https://github.com/southbridgeai/offmute)'s LLM diarization,
|
|
280
|
+
[meeting-diary](https://github.com/hrishioa/meeting-diary)'s ASR timing, and
|
|
281
|
+
[ipgu](https://github.com/hrishioa/ipgu)'s alignment discipline β was given independently to two
|
|
282
|
+
frontier models working autonomously. Both built the whole thing; both landed on the same
|
|
283
|
+
architecture; the differences live in the seams. Their unedited process logs, self-reviews, and
|
|
284
|
+
my manual reviews are preserved on the
|
|
285
|
+
`[glm](https://github.com/SouthBridgeAI/offmute-v2/tree/glm)` and
|
|
286
|
+
`[opus](https://github.com/SouthBridgeAI/offmute-v2/tree/opus)` branches, published as
|
|
287
|
+
`offmute-v2@glm` and `offmute-v2@opus`. A third line β this one,
|
|
288
|
+
`offmute-v2@fable`, now the primary β took everything both learned and kept going.
|
|
254
289
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
- **Node β₯ 20** and **`ffmpeg`/`ffprobe`** on `PATH` (CLI / library). The browser build uses
|
|
258
|
-
ffmpeg.wasm instead.
|
|
259
|
-
- **API keys** (from env or the `apiKeys` option):
|
|
260
|
-
- `GEMINI_API_KEY` (or `GOOGLE_API_KEY`) β required.
|
|
261
|
-
- `ASSEMBLYAI_API_KEY` β required for timing (or use `--timestamped whisper-groq` + `GROQ_API_KEY`).
|
|
262
|
-
- `DEEPSEEK_API_KEY` β optional, for `--level 3` name identification.
|
|
290
|
+
Full write-up: **["The frontier is open-source today"](https://southbridge.ai/blog/offmute-v2-glm-vs-opus)**.
|
|
263
291
|
|
|
264
292
|
## Development
|
|
265
293
|
|
|
266
294
|
```bash
|
|
267
|
-
git clone https://github.com/SouthBridgeAI/offmute-v2
|
|
268
|
-
|
|
269
|
-
npm
|
|
270
|
-
npm run typecheck
|
|
271
|
-
npm run
|
|
272
|
-
npm run dev -- meeting.mp4 # run from source
|
|
295
|
+
git clone https://github.com/SouthBridgeAI/offmute-v2 && cd offmute-v2
|
|
296
|
+
npm install
|
|
297
|
+
npm test # vitest
|
|
298
|
+
npm run typecheck # strict tsc
|
|
299
|
+
npm run dev -- path/to/file.mp4
|
|
273
300
|
```
|
|
274
301
|
|
|
275
|
-
|
|
276
|
-
[
|
|
277
|
-
|
|
278
|
-
## Credits
|
|
279
|
-
|
|
280
|
-
Built on three predecessors, with their hard-won lessons carried forward:
|
|
302
|
+
Releases ship via npm Trusted Publishing β see
|
|
303
|
+
[RELEASING.md](https://github.com/SouthBridgeAI/offmute-v2/blob/fable/RELEASING.md) for the
|
|
304
|
+
branch/dist-tag map.
|
|
281
305
|
|
|
282
|
-
|
|
283
|
-
- **[meeting-diary]** β ASR word-timestamps + speaker diarization.
|
|
284
|
-
- **[ipgu]** β chunk/merge discipline and structured extraction from LLM output.
|
|
285
|
-
|
|
286
|
-
Created by [Southbridge](https://southbridge.ai). Thanks to the model teams β including
|
|
287
|
-
[z.ai](https://z.ai) for GLM-5.2 and Anthropic for Claude Opus.
|
|
306
|
+
---
|
|
288
307
|
|
|
289
|
-
|
|
308
|
+
Built by [Southbridge](https://southbridge.ai) Β· created by [Hrishi Olickel](https://twitter.com/hrishioa)
|
|
290
309
|
|
|
291
|
-
[
|
|
292
|
-
[meeting-diary]: https://github.com/southbridgeai/meeting-diary
|
|
293
|
-
[ipgu]: https://github.com/hrishioa/ipgu
|
|
310
|
+
If offmute-v2 saved you an afternoon of "who said that?", **[a star](https://github.com/SouthBridgeAI/offmute-v2)** keeps the frog listening. πΈ
|