Skip to content

Windows native dictation preview: WASAPI, shared core and FunASR - #60

Draft
LeonardNJU wants to merge 9 commits into
masterfrom
feat/windows-native-dictation
Draft

Windows native dictation preview: WASAPI, shared core and FunASR#60
LeonardNJU wants to merge 9 commits into
masterfrom
feat/windows-native-dictation

Conversation

@LeonardNJU

@LeonardNJU LeonardNJU commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a Windows x64 native dictation preview on an isolated branch. The stable v5.0.7 release and installed Linux/macOS applications are not changed.

The frontend connects a held-F9/Shift+F9 shortcut, an isolated event-driven WASAPI recorder, the shared C++ core, native FunASR offline/streaming workers, a non-activating bounded preview, and guarded Unicode insertion. Escape cancels. Full results remain available for manual copying when focus changes or Windows rejects insertion. No clipboard overwrite or administrator elevation is used.

Windows transport uses private local-only named pipes, an inherited-handle allowlist, CreateProcessW, and kill-on-close job objects. Audio startup, stalls, stop, and inference have bounded waits. CLI transcription uses a private temporary copy because the shared core owns and removes its input file; the original source WAV is protected by a byte-preservation regression test.

Validation

  • Windows native CTest: 5/5 passed, including Unicode, quoted/CJK process arguments, fragmented pipe reads, limits/cancellation, descendant cleanup, full PCM integrity, original-WAV preservation, startup/stop timeout and subsequent-recording recovery.
  • Windows native FunASR offline and streaming worker builds passed.
  • Real recorded-speech validation on Windows: offline text 欢迎大家来体验达摩院推出的语音识别模型; streaming returned the same text with 8 partial updates, using 88,747 PCM frames from a hash-pinned public upstream fixture.
  • Full real-model validation: workflow 34675859921, native source commit 3c6fcdd.
  • Latest code validation at that commit: Windows, Linux native tests, and macOS build/sign/DMG jobs passed in workflow 34675860237.
  • Local macOS shared-core regression: 2/2 passed. Repository native contracts passed.

The final packaging workflow adds pinned ONNX Runtime notices and verifies that all tested EXE/DLL hashes remain unchanged. It records both the native-source and packaging commits and never promotes a stable release.

Scope / remaining hands-on validation

This remains a draft preview until testing on a physical Windows desktop. No Windows microphone device was attached to this development session. Physical capture, F9-to-target-app interaction, device switching/sleep/wake/Bluetooth, and application-specific insertion behavior are not claimed as tested. This is not a signed installer, TSF IME, ARM64 build, or complete feature parity with Linux/macOS; Ctrl+F9 voice editing and a full settings GUI are not implemented.

Setup and diagnostics: docs/integrations/windows.md. The portable ZIP includes executables/DLLs, checksums, notices, and an explicit PowerShell 7 model-setup script. Model revisions and hashes match the existing native model-manager manifest. No Python implementation or runtime dependency is added.

Final verified portable artifact

  • Packaging validation run: 34676402079 (success).
  • Artifact: VocoType-Windows-x64-preview, artifact ID 10292622140.
  • ZIP: VocoType-Windows-x64-preview-f100047.zip.
  • SHA-256: a7709b716c60e8a6fde901385b90cbf4106b070766b59a59ba6e04ebda7857cd.
  • Final audit: 38 checksum entries verified; 22 PE/COFF binaries verified as x64, including the five application/core/recorder/offline/streaming executables. All tested EXE/DLL hashes are unchanged from source commit 3c6fcdd; packaging commit is f100047.
  • The archive includes pinned ONNX Runtime notices, setup scripts and model hash manifests; models are downloaded explicitly, not bundled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants