简体中文 | English
This repository contains practical tools and reverse-engineering scripts for an OLYMPUS DR Series USB/HID device on Windows.
Primary workflow at repository root:
dictation.py- Main dictation runtime (
sherpa-onnx+ SenseVoice). - Hold
FAST_BACKWARDto start recording, release to run ASR and type text.
- Main dictation runtime (
read_media_keys.py- Real-time HID reader and bitmask parser.
- Source of truth for current button-bit mapping.
keys_monitor.py- Human-readable state transitions for key validation.
print_current_state.py- Raw HID snapshot/debug output.
create_dictation_shortcut.py- One-command setup helper (
.venv, dependencies, desktop shortcut).
- One-command setup helper (
Runtime actions configured in dictation.py:
| Key | Action |
|---|---|
FAST_BACKWARD |
Hold to record, release to transcribe/type |
NEW |
Sends Esc |
F1 |
Sends Ctrl+C |
F2 |
Types continue |
F3 |
Sends Ctrl+Enter |
F4 |
Sends Backspace |
REW |
Sends Enter |
FF |
Mouse wheel down |
INSERT_OVER |
Mouse wheel up |
- Root directory:
- Runtime scripts, setup script, key mapping file, and capture files (
*.pcap).
- Runtime scripts, setup script, key mapping file, and capture files (
analysis/:- Protocol/pcap analysis scripts and replay experiments.
qwen3_integration_research.md: quick feasibility research for Qwen3/Qwen3-ASR integration._tmp_*.pyfiles are scratch probes used during reverse engineering.
- Target device:
VID:PID = 07B4:0256. - Input state comes from HID interrupt IN reports.
INSERT_OVERtransitions correlate with host HIDSET_REPORT(Output)onEP0.- Observed LED-related control pattern:
bmRequestType=0x21bRequest=0x09wValue=0x0200wIndex=0x0000wLength=64
- Replaying candidate 64-byte output reports still does not reproduce LED behavior reliably; device/session context is likely missing.
- OS: Windows
- Python: 3.12
- Recommended: local
.venv
Dependencies are listed in requirements.txt.
python -m pip install -r .\requirements.txtMain packages:
pywinusbsherpa-onnxsounddevicenumpypynput
Create environment + install deps + desktop shortcut:
python .\create_dictation_shortcut.pyMonitor HID reports:
python .\read_media_keys.pyRun readable key monitor:
python .\keys_monitor.pyStart dictation runtime:
python .\dictation.pyDownload and extract the SenseVoice model (or pass --model-dir to point to your path):
https://github.com/k2-fsa/sherpa-onnx/releases/tag/asr-models
sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17.tar.bz2
Supports Chinese, English, Japanese, Korean, and Cantonese with automatic language detection and ITN (inverse text normalization).
- Analysis scripts are intentionally separated under
analysis/. - Scratch scripts can be cleaned up later if you want a stricter production-only repository layout.