feat(meeting): ground AI transcript correction in learned vocabulary

AI polishing of a recorded or pasted transcript was a generic rewrite: it
cleaned fillers but left names and in-house terms mangled even when the app
already knew them. Polishing now corrects dictionary pronunciations and
typed identifiers deterministically before and after the model, and hands
the model the learned term list plus the user's own expressions with
explicit rules: rewrite a misheard name, product or in-house term to the
learned spelling, and never swap an ordinary noun or ending on similarity
alone. Dictation output is re-checked the same way after the model runs.
This commit is contained in:
Yun Chan 2026-11-06 17:22:54 +09:00
parent 1f5372bfcc
commit e2d17601a4
8 changed files with 120 additions and 23 deletions

View file

@ -89,7 +89,7 @@ Status quick-reference: `[x]` done+verified · `[~]` partial/unverified · `[ ]`
| MTG-11 | Meeting AI chat over transcript | [x] | [ ] | [ ] | [x] | Desktop `MeetingChatPanel` + `MEETING_CHAT` |
| MTG-12 | Content reporting for generated docs | [-] | [ ] | [x] | [x] | `content-report` Edge + generation receipts |
| MTG-13 | Existing audio/video import into a meeting | [x] | [ ] | [~] | [x] | **2026-11-01:** Desktop `meetingMode:importRecording` reuses `FileTranscriptionService` without duplicate history, saves canonical timestamped transcript + normalized WAV, then opens existing minutes generation. Mobile `MeetingsScreen` creates the workspace then routes `meetingId` + `importRequest` to the existing durable Record meeting pipeline. **2026-11-02:** installed Windows 1.16.0 passed the actual Electron picker→timestamped transcript→local summary/action-item journey, so desktop is `[x]`. Fold6 `.3` import entry/editor rendered, but authenticated device file-to-minutes E2E remains (`GAP-MTG-03`). [Evidence](../evidence/2026-11-02-verification.md). |
| MTG-14 | Learning-informed transcript correction (user dictionary + typed vocabulary) | [~] | [ ] | [ ] | [ ] | **2026-11-05 (root cause + rebuild of the transcript-correction seam):** the learned corpus was only wired to input suggestions. Meeting/live captions ran STT with a hardcoded `다음은 한국어 대화입니다.` prompt (no dictionary, no learned terms), the refine prompt had no glossary, the refine result updated only `CaptionService`'s own copy (meetings and the renderer kept the raw line), and the persisted `rawTranscript` was a plain join of raw segments. Now: core SSOT `@d3ro/core/transcript-correction` (glossary build, dictionary-variant replacement, learned-identifier correction with a unique-best rule, LLM reference block) + desktop `TranscriptGlossaryService` (dictionary + `personal_phrases`, 15 s cache invalidated on dictionary writes, fail-closed) are wired into `CaptionService` (hint on every recognition, deterministic correction per final line, glossary-aware refine, `segment-updated` event), `MeetingRecordingSession`/`MeetingModeService` (refined lines reach the meeting transcript and renderer via `meetingMode:segmentUpdated`; auto-polish gets the glossary block), `FileTranscriptionService` (per-chunk hint + correction) and `VoiceModeService` (learned-term pass). **2026-11-05 (v1.16.3 correction policy):** the first cut also rewrote ordinary Hangul words by 1-jamo distance. Measured against the real local corpus (users/_local/d3ro.db, 3 stored meeting transcripts) it changed **286 of 3,005 words** (하면 to 라면, 이제 to 이게, 매일 to 메일, 정보 to 정도). Deterministic correction is now limited to dictionary pronunciations and typed Latin identifiers (canonical casing preserved); Korean terms reach recognition through the STT hint and the polish prompt only. Re-measured on the same corpus: **0 of 3,005**. Real-engine check (sidecar large-v3-turbo, Korean TTS fixture containing the user term): baseline 하람로그에 to hinted transcript haramlog에, and a dictionary pronunciation entry still maps 디에로 to D3RO. Hangul-layout typing artifacts (dkssudgktpdy) are dropped from the hint. Tests: core transcript-correction.test.ts (16), desktop transcript-glossary.test.ts (10); live meeting with real jargon still open (GAP-MTG-04). |
| MTG-14 | Learning-informed transcript correction (user dictionary + typed vocabulary) | [~] | [ ] | [ ] | [ ] | **2026-11-05 (root cause + rebuild of the transcript-correction seam):** the learned corpus was only wired to input suggestions. Meeting/live captions ran STT with a hardcoded `다음은 한국어 대화입니다.` prompt (no dictionary, no learned terms), the refine prompt had no glossary, the refine result updated only `CaptionService`'s own copy (meetings and the renderer kept the raw line), and the persisted `rawTranscript` was a plain join of raw segments. Now: core SSOT `@d3ro/core/transcript-correction` (glossary build, dictionary-variant replacement, learned-identifier correction with a unique-best rule, LLM reference block) + desktop `TranscriptGlossaryService` (dictionary + `personal_phrases`, 15 s cache invalidated on dictionary writes, fail-closed) are wired into `CaptionService` (hint on every recognition, deterministic correction per final line, glossary-aware refine, `segment-updated` event), `MeetingRecordingSession`/`MeetingModeService` (refined lines reach the meeting transcript and renderer via `meetingMode:segmentUpdated`; auto-polish gets the glossary block), `FileTranscriptionService` (per-chunk hint + correction) and `VoiceModeService` (learned-term pass). **2026-11-05 (v1.16.3 correction policy):** the first cut also rewrote ordinary Hangul words by 1-jamo distance. Measured against the real local corpus (users/_local/d3ro.db, 3 stored meeting transcripts) it changed **286 of 3,005 words** (하면 to 라면, 이제 to 이게, 매일 to 메일, 정보 to 정도). Deterministic correction is now limited to dictionary pronunciations and typed Latin identifiers (canonical casing preserved); Korean terms reach recognition through the STT hint and the polish prompt only. Re-measured on the same corpus: **0 of 3,005**. Real-engine check (sidecar large-v3-turbo, Korean TTS fixture containing the user term): baseline 하람로그에 to hinted transcript haramlog에, and a dictionary pronunciation entry still maps 디에로 to D3RO. Hangul-layout typing artifacts (dkssudgktpdy) are dropped from the hint. **2026-11-06 (v1.16.4 AI correction grounded in learning):** the polish pass no longer runs as a generic rewrite. Deterministic dictionary/identifier correction runs before and after the model, and the model receives a learned term list plus the user expressions with explicit rules (fix a misheard name/product/in-house term to the learned spelling; never swap ordinary nouns or endings on similarity alone). Re-measured on the real corpus: 0 of 3,005 deterministic changes, and the generated term block now shows canonical identifiers (HaramLog, Android, AI) with Hangul-layout artifacts removed from terms, hints and style examples. Dictation output is re-checked against the learned vocabulary after the LLM finishes. Tests: core transcript-correction.test.ts (17), desktop transcript-glossary.test.ts (10), red meeting-llm usecase (+1); live meeting with real jargon still open (GAP-MTG-04). |
---