diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f82368..0281cb2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,17 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Plugin system for custom pipelines -## [1.16.3] - 2026-11-06 - -> Supersedes 1.16.2, which could rewrite ordinary Korean words in transcripts. - -### Fixed -- Stop the learned-vocabulary pass from rewriting ordinary Korean. Measured against real meeting transcripts it changed 286 of 3,005 words (`하면`→`라면`, `이제`→`이게`, `매일`→`메일`, `정보`→`정도`). Deterministic correction is now limited to your dictionary's pronunciations and the Latin identifiers you type; Korean terms reach recognition through the prompt hint and the polish prompt instead. Re-measured: 0 of 3,005 words changed. -- Drop Hangul-layout typing artifacts (for example `dkssudgktpdy`) from the recognition hint so they no longer bias transcription, and keep the original casing of learned identifiers (`VSCode`). - -### Changed -- Korean terms are no longer auto-replaced word by word. They are used as a recognition hint and as reference for the local model, which decides with sentence context. - ## [1.16.2] - 2026-11-05 > Published from an annotated tag. Installer and update metadata are served by the diff --git a/apps/admin-swagger/openapi.json b/apps/admin-swagger/openapi.json index e31bb135..e65af1e0 100644 --- a/apps/admin-swagger/openapi.json +++ b/apps/admin-swagger/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "D3RO-VOICE Admin API", "description": "Admin CRM Edge Functions for user management, subscription CRUD, payment history, and audit logs.", - "version": "1.16.3" + "version": "1.16.2" }, "servers": [ { diff --git a/apps/admin/package.json b/apps/admin/package.json index 622bd21f..8e59960a 100644 --- a/apps/admin/package.json +++ b/apps/admin/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/admin", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice Admin CRM — SaaS 관리 도구", "scripts": { diff --git a/apps/api-server/D3ROVoice.Api.csproj b/apps/api-server/D3ROVoice.Api.csproj index b9cee3b7..9b140d46 100644 --- a/apps/api-server/D3ROVoice.Api.csproj +++ b/apps/api-server/D3ROVoice.Api.csproj @@ -2,7 +2,7 @@ net10.0 - 1.16.3 + 1.16.2 enable enable diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 32ea356a..2130ebd2 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/desktop", - "version": "1.16.3", + "version": "1.16.2", "productName": "d3ro-voice", "description": "로컬 AI 음성 어시스턴트 (Electron)", "main": "./out/main/index.js", diff --git a/apps/desktop/tests/main/services/transcript-glossary.test.ts b/apps/desktop/tests/main/services/transcript-glossary.test.ts index 8f59ec7e..f2ce6905 100644 --- a/apps/desktop/tests/main/services/transcript-glossary.test.ts +++ b/apps/desktop/tests/main/services/transcript-glossary.test.ts @@ -24,22 +24,13 @@ function learnPhrase(text: string, times: number): void { } describe('학습한 어휘가 전사 교정에 쓰인다', () => { - it('키보드로 배운 식별자와 한 글자 다른 전사 어절을 되돌린다', () => { - learnPhrase('VSCode 설정 열기', 5) - - const result = getTranscriptGlossaryService().correct('VSCod 설정 열기') - - expect(result.text).toBe('VSCode 설정 열기') - expect(result.corrections).toEqual([{ from: 'VSCod', to: 'VSCode', source: 'learned' }]) - }) - - it('한글 문장은 학습 어휘로 바꾸지 않는다', () => { + it('키보드로 배운 어절과 한 글자 다른 전사 어절을 되돌린다', () => { learnPhrase('회의록 정리해줘', 5) const result = getTranscriptGlossaryService().correct('회이록 정리해줘') - expect(result.text).toBe('회이록 정리해줘') - expect(result.corrections).toEqual([]) + expect(result.text).toBe('회의록 정리해줘') + expect(result.corrections).toEqual([{ from: '회이록', to: '회의록', source: 'learned' }]) }) it('사용자 사전의 발음 표기를 정본 표기로 바꾼다', () => { @@ -62,11 +53,11 @@ describe('학습한 어휘가 전사 교정에 쓰인다', () => { }) it('한 번만 쓴 어절은 학습 어휘로 쓰지 않는다', () => { - learnPhrase('VSCode 설정 열기', 1) + learnPhrase('회의록 정리해줘', 1) - const result = getTranscriptGlossaryService().correct('VSCod 설정 열기') + const result = getTranscriptGlossaryService().correct('회이록 정리해줘') - expect(result.text).toBe('VSCod 설정 열기') + expect(result.text).toBe('회이록 정리해줘') }) it('사전에 단어를 추가하면 캐시를 기다리지 않고 바로 반영된다', () => { diff --git a/apps/mobile-rn/android/app/build.gradle b/apps/mobile-rn/android/app/build.gradle index c8284053..5c319bd9 100644 --- a/apps/mobile-rn/android/app/build.gradle +++ b/apps/mobile-rn/android/app/build.gradle @@ -151,8 +151,8 @@ def versionSettingsValid = configuredVersionName != null && configuredVersionName ==~ strictSemver && configuredVersionCodeValue != null && configuredVersionCodeValue <= 2100000000L -def resolvedVersionName = versionSettingsValid ? configuredVersionName : "1.16.3" -def resolvedVersionCode = versionSettingsValid ? configuredVersionCodeValue.toInteger() : 1160300 +def resolvedVersionName = versionSettingsValid ? configuredVersionName : "1.16.2" +def resolvedVersionCode = versionSettingsValid ? configuredVersionCodeValue.toInteger() : 1160200 def requiredReleaseSettings = [ D3RO_RELEASE_STORE_FILE: releaseStoreFilePath, diff --git a/apps/mobile-rn/ios/D3ROVoice.xcodeproj/project.pbxproj b/apps/mobile-rn/ios/D3ROVoice.xcodeproj/project.pbxproj index f2ef1230..3a7cd11a 100644 --- a/apps/mobile-rn/ios/D3ROVoice.xcodeproj/project.pbxproj +++ b/apps/mobile-rn/ios/D3ROVoice.xcodeproj/project.pbxproj @@ -257,7 +257,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1160300; + CURRENT_PROJECT_VERSION = 1160200; ENABLE_BITCODE = NO; INFOPLIST_FILE = D3ROVoice/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; @@ -265,7 +265,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.16.3; + MARKETING_VERSION = 1.16.2; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -287,14 +287,14 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1160300; + CURRENT_PROJECT_VERSION = 1160200; INFOPLIST_FILE = D3ROVoice/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.16.3; + MARKETING_VERSION = 1.16.2; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/apps/mobile-rn/metadata/android/en-US/changelogs/1160300.txt b/apps/mobile-rn/metadata/android/en-US/changelogs/1160300.txt deleted file mode 100644 index a6c57884..00000000 --- a/apps/mobile-rn/metadata/android/en-US/changelogs/1160300.txt +++ /dev/null @@ -1 +0,0 @@ -Stability and performance improvements. diff --git a/apps/mobile-rn/metadata/android/ko-KR/changelogs/1160300.txt b/apps/mobile-rn/metadata/android/ko-KR/changelogs/1160300.txt deleted file mode 100644 index 183fbc16..00000000 --- a/apps/mobile-rn/metadata/android/ko-KR/changelogs/1160300.txt +++ /dev/null @@ -1 +0,0 @@ -안정성과 성능을 개선했습니다. diff --git a/apps/mobile-rn/package-lock.json b/apps/mobile-rn/package-lock.json index c0f39867..6dcb2f1b 100644 --- a/apps/mobile-rn/package-lock.json +++ b/apps/mobile-rn/package-lock.json @@ -1,12 +1,12 @@ { "name": "@d3ro/mobile-rn", - "version": "1.16.3", + "version": "1.16.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@d3ro/mobile-rn", - "version": "1.16.3", + "version": "1.16.2", "dependencies": { "@d3ro/api-client": "file:../../packages/api-client", "@d3ro/core": "file:../../packages/core", @@ -62,7 +62,7 @@ }, "../..": { "name": "d3ro-voice-monorepo", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "workspaces": [ "apps/desktop", @@ -81,7 +81,7 @@ }, "../../packages/api-client": { "name": "@d3ro/api-client", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "dependencies": { "@supabase/supabase-js": "^2.45.0" @@ -97,7 +97,7 @@ }, "../../packages/core": { "name": "@d3ro/core", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "dependencies": { "docx": "^9.6.1" @@ -108,7 +108,7 @@ }, "../../packages/i18n": { "name": "@d3ro/i18n", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "devDependencies": { "@types/react": "^19.0.0" @@ -119,7 +119,7 @@ }, "../../packages/ui-native": { "name": "@d3ro/ui-native", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "devDependencies": { "@types/react": "*" diff --git a/apps/mobile-rn/package.json b/apps/mobile-rn/package.json index 9f0d80bf..ae10f121 100644 --- a/apps/mobile-rn/package.json +++ b/apps/mobile-rn/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/mobile-rn", - "version": "1.16.3", + "version": "1.16.2", "private": true, "scripts": { "android": "react-native run-android", diff --git a/apps/web/package.json b/apps/web/package.json index f2e6c466..bf8a1072 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/web", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice 웹 앱 — Next.js 기반 SaaS 인터페이스", "scripts": { diff --git a/docs/map/10-feature-catalog.md b/docs/map/10-feature-catalog.md index 520eeb6a..ca2267ec 100644 --- a/docs/map/10-feature-catalog.md +++ b/docs/map/10-feature-catalog.md @@ -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, 1-jamo learned-term correction with a unique-best rule that never touches words the user actually wrote, 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). Tests: core `transcript-correction.test.ts` (16), desktop `transcript-glossary.test.ts` (9); real-app meeting verification still open (`GAP-MTG-04`). | --- diff --git a/docs/map/11-gap-backlog.md b/docs/map/11-gap-backlog.md index d86fbf88..430eda8d 100644 --- a/docs/map/11-gap-backlog.md +++ b/docs/map/11-gap-backlog.md @@ -68,7 +68,7 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res | GAP-MTG-01 | Meetings | Audio seek ↔ transcript timestamp sync missing. | `apps/mobile-rn/src/features/meetings/meetings-service.ts`, `MeetingDetailScreen.tsx`, `apps/web/src/components/meetings/{meeting-audio-player,live-transcript-list}.tsx`, `apps/mobile-rn/__tests__/meetings.test.ts` | `[x]` 2026-10-30: 모바일(`MeetingDetailScreen.tsx`)과 웹(`meeting-audio-player.tsx` ↔ `live-transcript-list.tsx`) 및 데스크톱(`TranscriptTab.tsx` / `EditableSegment.tsx`)에 `[MM:SS]` 구간 타임스탬프 파싱·오디오 시크 이동 및 재생 위치별 활성 전사 세그먼트 하이라이트를 구현했다 (`__tests__/meetings.test.ts` 통과). | | GAP-MTG-02 | Meetings | Speaker diarization only partially done on desktop; absent web/mobile. | `docs/phases/phase-15.5-speaker-diarization.md`, SSOT H-014 | Finish desktop pyannote path; expose speaker labels cross-surface. | | GAP-MTG-03 | Meetings | Existing recordings could become plain transcription history, but not a meeting with linked audio and minutes. | desktop `MeetingModeService`, `meeting/imported-recording.ts`, `meeting-mode-handlers.ts`; mobile `MeetingsScreen` → `RecordScreen`; MTG-13 | `[~]` 2026-11-02: installed Windows 1.16.0 passed native picker→timestamped transcript→local summary/action item with a real WAV (`2026-11-02-verification.md`). Desktop GUI gate is complete; authenticated Android picker→upload→transcript→minutes on Fold6 remains. | -| GAP-MTG-04 | Meetings | Learned typing vocabulary never reached meeting transcription: STT used a hardcoded Korean hint, refine had no glossary, refined lines stopped inside `CaptionService`, and the stored transcript was raw segments. | `packages/core/src/transcript-correction.ts`, `apps/desktop/src/main/services/TranscriptGlossaryService.ts`, `CaptionService.ts`, `meeting/MeetingRecordingSession.ts`, `MeetingModeService.ts`, `FileTranscriptionService.ts`, `VoiceModeService.ts`; MTG-14 | `[~]` 2026-11-05: one glossary SSOT wired into caption, meeting, file transcription and dictation; refined lines now propagate to the meeting transcript and renderer (`meetingMode:segmentUpdated`). **Direct measurement against the real local database** (`users/_local/d3ro.db`: 1,952 learned phrases / 2,522 typing samples / 3 meeting transcripts) exposed that the first cut also rewrote ordinary Korean (286 of 3,005 words: 하면→라면, 이제→이게, 매일→메일, 정보→정도), and v1.16.3 restricts deterministic correction to dictionary pronunciations plus typed Latin identifiers — re-measured **0 of 3,005**. Real-engine check with the local sidecar (`large-v3-turbo`): a Korean TTS fixture containing the user term transcribes as 하람로그에 with no hint and haramlog에 with the learned hint; a dictionary pronunciation entry maps 디에로 → D3RO. Hangul-layout artifacts (dkssudgktpdy) are excluded from the hint. Evidence: `packages/core/__tests__/transcript-correction.test.ts` 16/16, `apps/desktop/tests/main/services/transcript-glossary.test.ts` 10/10, core 589/589, desktop offline suite, workspace typecheck, touched-file ESLint, `test:hygiene`. **Remaining:** a live meeting with real names/jargon by voice, and a packaged-install check of the new IPC event. | +| GAP-MTG-04 | Meetings | Learned typing vocabulary never reached meeting transcription: STT used a hardcoded Korean hint, refine had no glossary, refined lines stopped inside `CaptionService`, and the stored transcript was raw segments. | `packages/core/src/transcript-correction.ts`, `apps/desktop/src/main/services/TranscriptGlossaryService.ts`, `CaptionService.ts`, `meeting/MeetingRecordingSession.ts`, `MeetingModeService.ts`, `FileTranscriptionService.ts`, `VoiceModeService.ts`; MTG-14 | `[~]` 2026-11-05: one glossary SSOT wired into caption, meeting, file transcription and dictation; refined lines now propagate to the meeting transcript and renderer (`meetingMode:segmentUpdated`). Evidence: `packages/core/__tests__/transcript-correction.test.ts` 16/16, `apps/desktop/tests/main/services/transcript-glossary.test.ts` 9/9, desktop offline suite, workspace typecheck, touched-file ESLint and `test:hygiene` green. **Remaining:** run a real meeting with the user's actual learned vocabulary and confirm no over-correction of ordinary Korean words, plus a packaged-install check of the new IPC event. | | GAP-INFRA-01 | Build | `apps/mobile-rn` is outside npm workspaces, so root `typecheck`/`test`/`lint` skip it. `typecheck:mobile`/`lint:mobile`/`test:mobile`/`verify:all` root scripts added 2026-09-13 (`package.json`), but membership/CI integration is still open. | `package.json`, `.forgejo/workflows/ci.yml`, `.gitlab-ci.yml` | `[x]` 2026-10-30: React Native Metro/Gradle 네이티브 오토링킹 격리를 위해 `apps/mobile-rn`은 독립 `node_modules`로 유지하고, 루트 `verify:all` 및 `.forgejo/workflows/ci.yml`·`.gitlab-ci.yml`의 `mobile-quality` 잡이 모바일 `lint`·`typecheck`·`test:ci`를 필수 게이트로 실행하도록 정본화했다. **2026-11-04:** root `test:mobile`도 watch-capable 기본 Jest가 아니라 mobile `test:ci`(`jest --runInBand`)를 호출하도록 고정했다. | | GAP-MOB-01 | Legacy | `apps/mobile` Expo skeleton duplicated auth/data code and got version-sync edits. | SSOT G-002 | `[x]` 2026-09-13: deleted `apps/mobile`, removed from `sync-version.mjs` and `package-lock.json`; `version:check` GREEN. | | GAP-INFRA-02 | CI | GitLab admin NAS deploy job is disabled; admin deploy is manual/GHCR. | `.gitlab-ci.yml`, `docs/deployment/nas-deploy-runbook.md` | `[x]` 2026-10-30: 임시 CI DinD 데몬만 바꾸던 구 잡 대신 `docker-compose.nas.yml` 기반의 정본 배포·헬스체크·롤백 절차를 `docs/deployment/nas-deploy-runbook.md`로 문서화하고 `.gitlab-ci.yml` 및 `02-infrastructure.md`에 연결했다. | diff --git a/memory/project_status.md b/memory/project_status.md index a739fb8a..ce676f40 100644 --- a/memory/project_status.md +++ b/memory/project_status.md @@ -7,7 +7,6 @@ - 해결: 새 SSOT `packages/core/src/transcript-correction.ts`(글로서리·사전 변형 치환·1자모 학습 어절 교정·LLM 참고 블록) + `TranscriptGlossaryService`(사전+개인 문구 15초 캐시, 사전 변경 시 즉시 무효화, 실패 시 빈 어휘) 를 `CaptionService`(매 인식 힌트·확정 줄 교정·교열 프롬프트·`segment-updated`), `MeetingRecordingSession`/`MeetingModeService`(`meetingMode:segmentUpdated`로 회의 세션·화면 갱신, auto-polish에 용어 블록), `FileTranscriptionService`(조각별 힌트·교정), `VoiceModeService`(학습 어절 패스)에 배선. - 교정 안전 규칙: 사용자가 실제로 쓴 어절은 절대 변경하지 않고, 후보가 동률이면 고치지 않으며, 조사는 그대로 두고 어절만 바꾼다. - 검증: core `transcript-correction.test.ts` 16, 데스크톱 `transcript-glossary.test.ts` 9, 데스크톱 offline 전체(2788)에서 드러난 회귀 2건을 수정해 재통과, workspace typecheck·변경 파일 ESLint·`test:hygiene` GREEN. 실회의 실측은 `GAP-MTG-04`로 남김. -- **1.16.2 배포 직후 실사용 DB로 직접 검증해 결함 발견 → 1.16.3으로 수정:** `users/_local/d3ro.db`(개인 문구 1,952·이핑 표본 2,522·회의 전사 3건)에 결정적 교정을 돌리니 실제 전사 3,005어절 중 **286개가 잘못 바뀌었다**(하면→라면, 이제→이게, 매일→메일, 정보→정도, 일단→일반). 학습 어휘 대부분이 일반 명사·부사·어미라 1자모 거리로는 오인식과 정상 단어를 구분할 수 없다. 수정: 결정적 교정은 **사전 발음 변형 + 사용자가 친 라틴 식별자**만(대소문자 보존), 한글 용어는 STT 힌트·LLM 교열 참고로만. 같은 코퍼스 재측정 **0/3,005**. 실제 사이드카(`large-v3-turbo`)로 한국어 TTS 픽스처 검증: 힌트 없음 `하람로그에` → 힌트 있음 `haramlog에`, 사전 발음 등록 시 `디에로`→`D3RO`. 한영 자판 오타 산물(`dkssudgktpdy`)은 힌트에서 제외. 교훈: **"학습 데이터를 쓴다"는 기능은 실사용 코퍼스로 오탐을 먼저 재고 나서 켠다.** ## v1.9.0 — 전사 구간·프리셋 프롬프트 동기화 (2026-09-27) diff --git a/package-lock.json b/package-lock.json index e2603a45..cfe80519 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "d3ro-voice-monorepo", - "version": "1.16.3", + "version": "1.16.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "d3ro-voice-monorepo", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "workspaces": [ "apps/desktop", @@ -25,7 +25,7 @@ }, "apps/admin": { "name": "@d3ro/admin", - "version": "1.16.3", + "version": "1.16.2", "dependencies": { "@d3ro/api-client": "*", "@d3ro/core": "*", @@ -51,7 +51,7 @@ }, "apps/desktop": { "name": "@d3ro/desktop", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "dependencies": { "@d3ro/core": "*", @@ -103,7 +103,7 @@ }, "apps/web": { "name": "@d3ro/web", - "version": "1.16.3", + "version": "1.16.2", "dependencies": { "@d3ro/api-client": "*", "@d3ro/core": "*", @@ -16940,7 +16940,7 @@ }, "packages/api-client": { "name": "@d3ro/api-client", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "dependencies": { "@supabase/supabase-js": "^2.45.0" @@ -16956,7 +16956,7 @@ }, "packages/core": { "name": "@d3ro/core", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "dependencies": { "docx": "^9.6.1" @@ -16967,7 +16967,7 @@ }, "packages/i18n": { "name": "@d3ro/i18n", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "devDependencies": { "@types/react": "^19.0.0" @@ -16978,7 +16978,7 @@ }, "packages/ui": { "name": "@d3ro/ui", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "dependencies": { "@d3ro/core": "*" @@ -16998,7 +16998,7 @@ }, "packages/ui-native": { "name": "@d3ro/ui-native", - "version": "1.16.3", + "version": "1.16.2", "license": "MIT", "devDependencies": { "@types/react": "*" diff --git a/package.json b/package.json index 4ba41ae4..3e79e628 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d3ro-voice-monorepo", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice — 멀티플랫폼 AI 음성 어시스턴트 (Monorepo)", "author": "D3RO", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 75c2b514..caf27d4e 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/api-client", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice API 클라이언트 — Supabase 래퍼 (web/desktop/mobile 공유)", "license": "MIT", diff --git a/packages/core/__tests__/transcript-correction.test.ts b/packages/core/__tests__/transcript-correction.test.ts index 3fed7f3e..e6bd0b5e 100644 --- a/packages/core/__tests__/transcript-correction.test.ts +++ b/packages/core/__tests__/transcript-correction.test.ts @@ -90,45 +90,33 @@ describe('replaceDictionaryTerms', () => { describe('correctLearnedTerms', () => { const glossary = buildTranscriptGlossary({ - phrases: phrases(['VSCode 설정 열기', 6], ['D3RO Voice 녹음', 4]), + phrases: phrases(['회의록 정리해줘', 6], ['전사 교정', 4]), }) - it('학습한 식별자와 한 글자 다른 전사 어절을 되돌린다', () => { - const result = correctLearnedTerms('VSCod 설정 열기', glossary) + it('1자모 차이 나는 전사 어절을 학습 어절로 되돌린다', () => { + const result = correctLearnedTerms('회이록 정리해줘', glossary) - expect(result.text).toBe('VSCode 설정 열기') - expect(result.corrections).toEqual([{ from: 'VSCod', to: 'VSCode', source: 'learned' }]) + expect(result.text).toBe('회의록 정리해줘') + expect(result.corrections).toEqual([{ from: '회이록', to: '회의록', source: 'learned' }]) }) - it('이미 맞게 적힌 식별자는 건드리지 않는다', () => { - const result = correctLearnedTerms('VSCode 설정 열기', glossary) + it('조사는 붙인 채로 어절만 고친다', () => { + expect(correctLearnedTerms('회이록은 좋다', glossary).text).toBe('회의록은 좋다') + }) - expect(result.text).toBe('VSCode 설정 열기') + it('사용자가 실제로 쓴 어절은 건드리지 않는다', () => { + const result = correctLearnedTerms('회의록 정리해줘', glossary) + + expect(result.text).toBe('회의록 정리해줘') expect(result.corrections).toEqual([]) }) - it('한글 어절은 1자모만 달라도 고치지 않는다', () => { - // 실사용 코퍼스 측정: 한글까지 고치면 정상 문장이 대량으로 망가졌다(하면→라면, 이제→이게 …). - const korean = buildTranscriptGlossary({ - phrases: phrases(['회의록 정리해줘', 6], ['라면 먹고 싶다', 5]), - }) - - expect(correctLearnedTerms('회이록 정리해줘', korean).text).toBe('회이록 정리해줘') - expect(correctLearnedTerms('하면 좋겠다', korean).text).toBe('하면 좋겠다') - }) - it('후보가 둘 이상이면(동률) 고치지 않는다', () => { const tied = buildTranscriptGlossary({ - phrases: phrases(['vscode 사용', 4], ['vscodf 사용', 4]), + phrases: phrases(['정리해', 4], ['정리히', 4]), }) - expect(correctLearnedTerms('vscodd', tied).text).toBe('vscodd') - }) - - it('너무 짧은 식별자·한 글자 어절은 대상이 아니다', () => { - const shortTerms = buildTranscriptGlossary({ phrases: phrases(['api 서버', 9]) }) - - expect(correctLearnedTerms('ap 서버', shortTerms).text).toBe('ap 서버') + expect(correctLearnedTerms('정리하', tied).text).toBe('정리하') }) it('어휘가 없으면 원문을 그대로 돌려준다', () => { @@ -136,6 +124,15 @@ describe('correctLearnedTerms', () => { expect(result).toEqual({ text: '아무 말이나 적는다', corrections: [] }) }) + + it('사전 정본 표기가 학습 어절보다 우선한다', () => { + const withDictionary = buildTranscriptGlossary({ + dictionary: [{ word: '회의록', pronunciation: null }], + phrases: phrases(['회의녹 정리', 9]), + }) + + expect(correctLearnedTerms('회이록 정리', withDictionary).text).toBe('회의록 정리') + }) }) describe('LLM 교열 참고 블록', () => { diff --git a/packages/core/package.json b/packages/core/package.json index 253b3020..c9d73205 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/core", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice 공유 비즈니스 로직 — 타입, 에러, IPC 채널, 상수, 유틸", "license": "MIT", diff --git a/packages/core/src/transcript-correction.ts b/packages/core/src/transcript-correction.ts index 0e06e201..981b1956 100644 --- a/packages/core/src/transcript-correction.ts +++ b/packages/core/src/transcript-correction.ts @@ -12,7 +12,7 @@ // // 순수 함수만 둔다. DB·Electron 을 모르므로 데스크톱 서비스가 소스를 주입한다. -import { editDistance, latinToHangul, tokenizeWords } from './typo-correction' +import { decomposeHangul, editDistance, tokenizeWords } from './typo-correction' /** 사용자 사전 한 항목 */ export interface GlossaryDictionaryEntry { @@ -59,7 +59,15 @@ const STOP_WORDS: ReadonlySet = new Set([ '이렇게', '그렇게', '저렇게', '여기', '거기', '저기', ]) -/** 학습 어휘를 STT 힌트·LLM 교열·식별자 교정에 쓰기 위한 묶음. */ +/** 토큰에서 떼어 낼 수 있는 조사 (긴 것부터) */ +const JOSA_SUFFIXES: readonly string[] = [ + '이라는', '이라고', '이라도', '에서는', '에게는', '에서도', '으로는', '으로써', + '에서는', '부터', '까지', '에게', '한테', '에서', '으로', '라고', '라는', + '이나', '라도', '이랑', '하고', '이고', '이든', '처럼', '보다', '만큼', + '에는', '에도', '께서', '이란', '이라', + '은', '는', '이', '가', '을', '를', '에', '의', '로', '도', '와', '과', '만', '들', +] + export interface TranscriptGlossary { /** 사전 정본 단어 (원표기) */ terms: readonly string[] @@ -67,8 +75,6 @@ export interface TranscriptGlossary { dictionary: readonly { word: string; variants: readonly string[] }[] /** 소문자 어절 → 빈도 (교정 후보) */ vocabulary: ReadonlyMap - /** 소문자 어절 → 처음 본 표기 (VSCode 같은 대소문자 보존) */ - canonical: ReadonlyMap /** 사용자가 실제로 쓰는 표현 (문체 참고) */ examples: readonly string[] /** STT initial_prompt 힌트 (없으면 빈 문자열) */ @@ -90,7 +96,6 @@ const EMPTY_GLOSSARY: TranscriptGlossary = { terms: [], dictionary: [], vocabulary: new Map(), - canonical: new Map(), examples: [], promptHint: '', } @@ -139,7 +144,6 @@ export function buildTranscriptGlossary(input: { const dictionary: Array<{ word: string; variants: readonly string[] }> = [] const terms: string[] = [] const vocabulary = new Map() - const canonical = new Map() const seen = new Set() for (const entry of (input.dictionary ?? []).slice(0, limits.dictionaryEntries)) { @@ -152,13 +156,10 @@ export function buildTranscriptGlossary(input: { terms.push(word) // 사전 정본은 어떤 학습 어절보다 우선 후보가 되도록 큰 가중치를 준다. bump(vocabulary, key, 1000) - canonical.set(key, word) } const examples: string[] = [] const phraseTokens = new Map() - /** 같은 뜻의 한글 표기가 코퍼스에 있는 영문 토큰(한영 자판 오타 산물) — 힌트·교정에서 뺀다. */ - const hangulObserved = new Set() for (const phrase of (input.phrases ?? []).slice(0, limits.phrases)) { const text = phrase.text?.replace(/\s+/gu, ' ').trim() if (!text) continue @@ -174,21 +175,7 @@ export function buildTranscriptGlossary(input: { for (const token of tokenizeWords(text)) { const word = token.text if (!isLearnableToken(word)) continue - if (/^[가-힣]+$/u.test(word)) hangulObserved.add(word) - const key = word.toLowerCase() - bump(phraseTokens, key, weight) - if (!canonical.has(key)) canonical.set(key, word) - } - } - - // 한영 자판 오타 산물( 같은)은 같은 뜻의 한글 표기가 코퍼스에 있으므로 뺀다. - // 그대로 두면 STT 힌트가 의미 없는 라틴 문자열로 편향되고, 식별자 교정 후보로도 쓰인다. - for (const word of [...phraseTokens.keys()]) { - if (!/^[a-z]+$/u.test(word)) continue - const converted = latinToHangul(word) - if (converted.complete && hangulObserved.has(converted.text)) { - phraseTokens.delete(word) - canonical.delete(word) + bump(phraseTokens, word.toLowerCase(), weight) } } @@ -224,9 +211,9 @@ export function buildTranscriptGlossary(input: { const promptHint = joined ? `용어: ${joined}.` : '' if (vocabulary.size === 0 && terms.length === 0 && examples.length === 0) { - return { ...EMPTY_GLOSSARY, vocabulary: new Map(), canonical: new Map() } + return { ...EMPTY_GLOSSARY, vocabulary: new Map() } } - return { terms, dictionary, vocabulary, canonical, examples, promptHint } + return { terms, dictionary, vocabulary, examples, promptHint } } /** 글로서리에 아무 정보도 없으면 true */ @@ -300,8 +287,8 @@ export function replaceDictionaryTerms( interface VocabularyCandidate { word: string count: number - lower: string - chars: readonly string[] + jamo: readonly string[] + script: 'hangul' | 'latin' } interface VocabularyIndex { @@ -316,16 +303,11 @@ interface VocabularyIndex { */ const vocabularyIndexCache = new WeakMap() -/** - * 결정적 교정 대상은 ASCII 식별자(제품명·약어·코드)뿐이다. - * - * 한글 어절을 「학습 어휘와 1자모 다르면 교체」로 고치는 방식은 실사용 DB 코퍼스로 측정했을 때 - * 정상 문장을 대량으로 망쳤다(회의 전사 3,005어절 중 286개 변경: 하면→라면, 이제→이게, 매일→메일, - * 정보→정도, 일단→일반 …). 사용자가 실제로 쓰는 어휘에는 일반 명사·부사·어미가 대부분이라 - * 1자모 거리만으로는 「오인식」과 「정상 단어」를 구분할 수 없다. 한글 용어는 STT 힌트와 LLM 교열에만 - * 쓰고, 결정적으로는 고치지 않는다(정밀도 우선). - */ -const IDENTIFIER_TOKEN = /^[A-Za-z][A-Za-z0-9]{3,}$/u +function scriptOf(value: string): 'hangul' | 'latin' | null { + if (/^[가-힣]+$/u.test(value)) return 'hangul' + if (/^[A-Za-z]+$/u.test(value)) return 'latin' + return null +} function buildVocabularyIndex(glossary: TranscriptGlossary): VocabularyIndex { const cached = vocabularyIndexCache.get(glossary) @@ -339,37 +321,40 @@ function buildVocabularyIndexUncached(glossary: TranscriptGlossary): VocabularyI const byLength = new Map() const known = new Set() for (const [word, count] of glossary.vocabulary) { - if (!IDENTIFIER_TOKEN.test(word)) continue + const script = scriptOf(word) + if (!script) continue known.add(word) const candidate: VocabularyCandidate = { - word: glossary.canonical.get(word) ?? word, + word, count, - lower: word.toLowerCase(), - chars: Array.from(word.toLowerCase()), + jamo: decomposeHangul(word), + script, } - const bucket = byLength.get(candidate.chars.length) + const bucket = byLength.get(candidate.jamo.length) if (bucket) bucket.push(candidate) - else byLength.set(candidate.chars.length, [candidate]) + else byLength.set(candidate.jamo.length, [candidate]) } return { byLength, known } } /** - * 학습 어휘에서 1글자 차이 나는 유일한 후보를 찾는다. + * 학습 어절에서 1자모 차이 나는 유일한 후보를 찾는다. * 동률이면(어느 쪽이 맞는지 알 수 없으면) 고치지 않는다. */ function bestCandidate(token: string, index: VocabularyIndex): VocabularyCandidate | null { - const lower = token.toLowerCase() - const chars = Array.from(lower) + const script = scriptOf(token) + if (!script) return null + const jamo = decomposeHangul(token) let best: VocabularyCandidate | null = null let bestCount = 0 let ties = 0 - for (const length of [chars.length - 1, chars.length, chars.length + 1]) { + for (const length of [jamo.length - 1, jamo.length, jamo.length + 1]) { const bucket = index.byLength.get(length) if (!bucket) continue for (const candidate of bucket) { - if (candidate.lower === lower) continue - if (editDistance(chars, candidate.chars) > 1) continue + if (candidate.script !== script) continue + if (candidate.jamo.length === jamo.length && candidate.word === token.toLowerCase()) continue + if (editDistance(jamo, candidate.jamo) > 1) continue if (candidate.count > bestCount) { best = candidate bestCount = candidate.count @@ -382,9 +367,27 @@ function bestCandidate(token: string, index: VocabularyIndex): VocabularyCandida return ties === 0 ? best : null } +interface TokenAttempt { + /** 비교할 어절 (조사를 떼어 낸 형태일 수 있다) */ + text: string +} + +function tokenAttempts(token: string): TokenAttempt[] { + const attempts: TokenAttempt[] = [{ text: token }] + for (const josa of JOSA_SUFFIXES) { + if (token.length - josa.length < 2) continue + if (!token.endsWith(josa)) continue + const stem = token.slice(0, token.length - josa.length) + if (!/^[가-힣A-Za-z0-9]+$/u.test(stem)) continue + attempts.push({ text: stem }) + break + } + return attempts +} + /** - * 학습 어휘로 ASCII 식별자 어절을 되돌린다 (예: `vscod` → `VSCode`). - * 한글 어절·띄어쓰기·문장부호는 건드리지 않는다. + * 학습 어휘로 어절을 되돌린다. 띄어쓰기·문장부호·조사는 그대로 두고 어절만 바꾼다. + * 사용자가 실제로 쓴 어절(어휘에 있음)은 절대 건드리지 않는다. */ export function correctLearnedTerms( text: string, @@ -394,20 +397,26 @@ export function correctLearnedTerms( if (!trimmed || glossary.vocabulary.size === 0) return { text: trimmed, corrections: [] } const index = buildVocabularyIndex(glossary) - if (index.byLength.size === 0) return { text: trimmed, corrections: [] } - const corrections: TranscriptCorrectionEntry[] = [] let out = '' let cursor = 0 for (const token of tokenizeWords(trimmed)) { - if (!IDENTIFIER_TOKEN.test(token.text)) continue - if (index.known.has(token.text.toLowerCase())) continue - const candidate = bestCandidate(token.text, index) - if (!candidate) continue - corrections.push({ from: token.text, to: candidate.word, source: 'learned' }) - out += trimmed.slice(cursor, token.start) + candidate.word - cursor = token.end + let replaced: { value: string; prefixLength: number } | null = null + for (const attempt of tokenAttempts(token.text)) { + if (index.known.has(attempt.text.toLowerCase())) continue + if (attempt.text.length < 2) continue + const candidate = bestCandidate(attempt.text, index) + if (!candidate) continue + replaced = { value: candidate.word, prefixLength: attempt.text.length } + break + } + if (!replaced) continue + const original = token.text.slice(0, replaced.prefixLength) + if (original === replaced.value) continue + corrections.push({ from: original, to: replaced.value, source: 'learned' }) + out += trimmed.slice(cursor, token.start) + replaced.value + cursor = token.start + replaced.prefixLength } if (corrections.length === 0) return { text: trimmed, corrections: [] } diff --git a/packages/i18n/package.json b/packages/i18n/package.json index bf6ec98f..8db5da78 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/i18n", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice 공유 i18n — 12개 locale, 타입 안전 키, Context, 포맷 유틸", "license": "MIT", diff --git a/packages/ui-native/package.json b/packages/ui-native/package.json index b33f3719..8945a0f4 100644 --- a/packages/ui-native/package.json +++ b/packages/ui-native/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/ui-native", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice React Native DS — MetalCard/PhosphorText/Led/WaveBars etc.", "license": "MIT", diff --git a/packages/ui/package.json b/packages/ui/package.json index 9a8d8037..3c734651 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@d3ro/ui", - "version": "1.16.3", + "version": "1.16.2", "private": true, "description": "D3RO Voice 공유 UI — 디자인 시스템 컴포넌트 + 테마 토큰 + CSS 변수 맵", "license": "MIT", diff --git a/release/product-version.json b/release/product-version.json index 466da77b..5b8d2e3f 100644 --- a/release/product-version.json +++ b/release/product-version.json @@ -1,8 +1,8 @@ { "schemaVersion": 1, - "version": "1.16.3", - "androidVersionCode": 1160300, - "iosBuildNumber": 1160300, - "releaseDate": "2026-11-06", + "version": "1.16.2", + "androidVersionCode": 1160200, + "iosBuildNumber": 1160200, + "releaseDate": "2026-11-05", "desktopLicensePublicKeyId": "5c52b765135ee2531c681b53cd4dc0e96fff8737f496c0b04ba8334fc81a887f" } diff --git a/site/package-lock.json b/site/package-lock.json index 81218c2e..407c2da1 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1,12 +1,12 @@ { "name": "d3ro-voice-site", - "version": "1.16.3", + "version": "1.16.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "d3ro-voice-site", - "version": "1.16.3", + "version": "1.16.2", "dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/site/package.json b/site/package.json index 1715898a..940a93ec 100644 --- a/site/package.json +++ b/site/package.json @@ -1,7 +1,7 @@ { "name": "d3ro-voice-site", "private": true, - "version": "1.16.3", + "version": "1.16.2", "type": "module", "scripts": { "dev": "vite --port 5199 --host", diff --git a/site/src/release.ts b/site/src/release.ts index e525d2ae..389b99bd 100644 --- a/site/src/release.ts +++ b/site/src/release.ts @@ -5,10 +5,10 @@ // NAS 배포는 바이너리를 포함하지 않으므로 `/releases/...` 같은 로컬 경로는 // 실제 배포 환경에서 404가 된다. -export const DESKTOP_VERSION = '1.16.3' +export const DESKTOP_VERSION = '1.16.2' /** 릴리스 게시일. `release/product-version.json`의 releaseDate와 같아야 한다. */ -export const DESKTOP_RELEASE_DATE = '2026-11-06' +export const DESKTOP_RELEASE_DATE = '2026-11-05' const FORGEJO_ORIGIN = 'https://git.chanpaca.net' const FORGEJO_OWNER = 'yunchan'