<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://seanwang114514.github.io/Personal-blog/feed.xml" rel="self" type="application/atom+xml" /><link href="https://seanwang114514.github.io/Personal-blog/" rel="alternate" type="text/html" /><updated>2026-10-07T04:28:29+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/feed.xml</id><title type="html">Sean Wang</title><subtitle>Sean Wang 的个人博客 — 软件、工具、AI 与折腾记录</subtitle><entry><title type="html">Rime VMenu 全家桶：一个 v 键，把小狼毫变成输入套件</title><link href="https://seanwang114514.github.io/Personal-blog/2026/09/30/weasel-vmenu-suite/" rel="alternate" type="text/html" title="Rime VMenu 全家桶：一个 v 键，把小狼毫变成输入套件" /><published>2026-09-30T08:00:00+00:00</published><updated>2026-09-30T08:00:00+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/2026/09/30/weasel-vmenu-suite</id><content type="html" xml:base="https://seanwang114514.github.io/Personal-blog/2026/09/30/weasel-vmenu-suite/"><![CDATA[<blockquote>
  <p>把小狼毫（Weasel）升级成一套完整的输入工具箱：按 <code class="language-plaintext highlighter-rouge">v</code> 出功能菜单，可视化窗口管词库与配置，剪贴板历史随手调用，按住 <code class="language-plaintext highlighter-rouge">Ctrl+Win</code> 就能说话输入 —— 全程离线，不需要管理员权限。</p>
</blockquote>

<div style="display:flex;gap:12px;flex-wrap:wrap;margin:24px 0 0;">
<a href="https://github.com/SeanWang114514/weasel-vmenu-suite" style="display:inline-flex;align-items:center;gap:8px;background:#24292e;color:#fff;padding:10px 20px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,0.2);">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" /></svg>
Star on GitHub
</a>
<a href="https://github.com/SeanWang114514/weasel-vmenu-suite/releases/tag/v1.0.0" style="display:inline-flex;align-items:center;gap:8px;background:#1677FF;color:#fff;padding:10px 20px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,0.2);">
⬇ 下载 exe 直装包（约 1.1GB）
</a>
</div>

<div style="border:1px solid #E8E8E8;border-left:4px solid #1677FF;border-radius:8px;padding:16px 20px;margin:24px 0;background:#F0F5FF;">
<div style="font-size:15px;font-weight:600;color:#262626;margin-bottom:4px;">快速下载</div>
<div style="font-size:13px;color:#595959;">项目地址：<a href="https://github.com/SeanWang114514/weasel-vmenu-suite" style="color:#1677FF;">SeanWang114514/weasel-vmenu-suite</a>　·　下载地址：<a href="https://github.com/SeanWang114514/weasel-vmenu-suite/releases/tag/v1.0.0" style="color:#1677FF;">Release v1.0.0</a>。两个包<b>功能完全一致</b>，任选其一：<code>RimeVMenu-Setup-1.0.0.exe</code>（双击直装）与 <code>RimeVMenu-1.0.0.zip</code>（解压后双击 <code>安装.bat</code>，也可被小狼毫官方 <code>rime-install.bat</code> 导入）。</div>
</div>

<!--more-->

<h2 id="为什么做这个">为什么做这个</h2>

<p>小狼毫（Weasel）本身的拼音方案（尤其是 <a href="https://github.com/iDvel/rime-ice">rime-ice</a>）已经很能打了，但它交付给用户的是一套<strong>需要自己动手的零件</strong>：想加剪贴板历史要自己找补丁，想有个图形化设置窗口要自己改 yaml，想语音输入得再开一个工具。我用小狼毫的这几年，配置越攒越厚，每次换机器都要重来一遍。</p>

<p>于是我把常用的那些零件<strong>缝成一整套</strong>，装完就有完整的体验，不再需要逐条搜教程 —— 这就是 <strong>Rime VMenu 全家桶</strong>：</p>

<ul>
  <li>输入法里按一个 <strong><code class="language-plaintext highlighter-rouge">v</code></strong>，功能菜单就出来：设置窗口、剪贴板历史、快捷输入、常用语、原符号，全在候选栏里；</li>
  <li>打字体验的三件小事一次补齐：候选框一行 9 个（<code class="language-plaintext highlighter-rouge">↓</code> 展开成 4×9 方格）、<strong>上一个词猜下一个词</strong>、<strong>前后鼻音五对可单独开关</strong>；</li>
  <li>语音输入按住 <code class="language-plaintext highlighter-rouge">Ctrl+Win</code> 说话，松开就上屏 —— 本地推理，不联网、不注册、不计次数；</li>
  <li>后台常驻三个小进程（守护、剪贴板同步、设置窗口），占用小到可以忽略；</li>
  <li><strong>两种发布格式功能完全一致</strong>：exe 直装包和 rime 导入 zip，都带 971MB 的语音模型。</li>
</ul>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 374" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Rime VMenu 全家桶架构：按 v 出五项功能菜单，后台常驻三个进程">
<defs>
<marker id="vm-arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><polygon points="0 0, 8 4, 0 8" fill="#BFBFBF" /></marker>
</defs>
<rect x="1" y="1" width="718" height="372" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="32" y="38" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="20" font-weight="700" fill="#262626">Rime VMenu 全家桶</text>
<text x="32" y="60" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#8C8C8C">小狼毫输入法增强套件 · 一个 v 键 · 全程离线</text>
<rect x="525" y="24" width="166" height="30" rx="15" fill="#E6F4FF" />
<text x="608" y="44" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#1677FF">Windows · 小狼毫 Weasel</text>
<line x1="32" y1="76" x2="688" y2="76" stroke="#F0F0F0" />
<!-- 左：按 v 出的功能菜单 -->
<rect x="32" y="70" width="10" height="10" rx="2" fill="#1677FF" />
<text x="50" y="79" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">按 v 之后：候选一行 5 项</text>
<rect x="242" y="66" width="110" height="22" rx="11" fill="#F5F5F5" />
<text x="297" y="81" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">librime + lua</text>
<rect x="32" y="96" width="320" height="38" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="42" y="120" font-family="system-ui, sans-serif" font-size="11" font-weight="700" fill="#1677FF">1</text>
<text x="64" y="120" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">设置窗口</text>
<text x="116" y="120" font-family="system-ui, sans-serif" font-size="11" font-weight="700" fill="#1677FF">2</text>
<text x="138" y="120" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">剪贴板</text>
<text x="190" y="120" font-family="system-ui, sans-serif" font-size="11" font-weight="700" fill="#1677FF">3</text>
<text x="212" y="120" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">快捷输入</text>
<text x="276" y="120" font-family="system-ui, sans-serif" font-size="11" font-weight="700" fill="#1677FF">4</text>
<text x="298" y="120" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">常用语</text>
<text x="32" y="152" font-family="system-ui, sans-serif" font-size="11" font-weight="700" fill="#1677FF">5</text>
<text x="54" y="152" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">原符号</text>
<text x="130" y="152" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">回车 = 直接打出字母 v</text>
<circle cx="38" cy="176" r="3" fill="#1677FF" />
<text x="50" y="180" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">候选框一行 9 个 · 按 ↓ 展开 4×9 方格</text>
<circle cx="38" cy="204" r="3" fill="#1677FF" />
<text x="50" y="208" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">下一个候选词预测（bigram 二元统计）</text>
<circle cx="38" cy="232" r="3" fill="#1677FF" />
<text x="50" y="236" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">前后鼻音五对模糊音，可逐对开关</text>
<circle cx="38" cy="260" r="3" fill="#1677FF" />
<text x="50" y="264" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#262626">网址 / 路径智能标点（。→ . 、→ \）</text>
<!-- 右：常驻后台 -->
<rect x="368" y="70" width="10" height="10" rx="2" fill="#52C41A" />
<text x="386" y="79" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">常驻后台</text>
<rect x="568" y="66" width="120" height="22" rx="11" fill="#F5F5F5" />
<text x="628" y="81" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">合计约 19MB</text>
<rect x="368" y="100" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="126" r="4" fill="#52C41A" />
<text x="410" y="121" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">VMenu.exe</text>
<text x="410" y="140" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">守护 · 剪贴板同步 · 开机自启（各约 1MB）</text>
<rect x="368" y="162" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="188" r="4" fill="#52C41A" />
<text x="410" y="183" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">VMenuSettings.exe</text>
<text x="410" y="202" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">C# WinForms 设置窗口，v → 1 秒开（约 17MB）</text>
<rect x="368" y="224" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="250" r="4" fill="#52C41A" />
<text x="410" y="245" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">VoiceOverlay.exe</text>
<text x="410" y="264" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">语音悬浮球，Ctrl+Win 长按说话（按需拉起）</text>
<!-- 底部数据流 -->
<rect x="32" y="292" width="656" height="52" rx="8" fill="#F5F5F5" />
<rect x="48" y="302" width="128" height="32" rx="16" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="112" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#262626">敲拼音 / 按住说话</text>
<line x1="190" y1="318" x2="226" y2="318" stroke="#8C8C8C" stroke-width="1.5" marker-end="url(#vm-arrow)" />
<text x="360" y="323" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">lua 过滤器链 · Qwen3-ASR 本地推理</text>
<line x1="494" y1="318" x2="530" y2="318" stroke="#8C8C8C" stroke-width="1.5" marker-end="url(#vm-arrow)" />
<rect x="540" y="302" width="132" height="32" rx="16" fill="#F6FFED" stroke="#B7EB8F" />
<text x="606" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#389E0D">上屏</text>
<text x="360" y="364" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">小狼毫 Weasel 0.17+ · librime 1.13 · rime-ice 词库 · llama.cpp CPU 推理</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 1 · 左边是按 `v` 之后候选栏里发生的事，右边是它背后常驻的三个小进程</p>

<h2 id="一个-v五个入口">一个 v，五个入口</h2>

<p>装好之后<strong>打字的部分完全没变</strong>，只是多了一个 <code class="language-plaintext highlighter-rouge">v</code>：</p>

<table>
  <thead>
    <tr>
      <th>按键</th>
      <th>作用</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code></td>
      <td>打开功能菜单，候选一行 5 项：设置 / 剪贴板 / 快捷输入 / 常用语 / 原符号</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">1</code></td>
      <td>打开可视化设置窗口（词库、剪贴板、模糊音、语音快捷键都在里面）</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">2</code></td>
      <td>剪贴板快查：数字键上屏那一条，<code class="language-plaintext highlighter-rouge">m</code> 多看 10 条，<code class="language-plaintext highlighter-rouge">d</code> 删除，<code class="language-plaintext highlighter-rouge">x</code> 清空</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">3</code></td>
      <td>快捷输入：计算 / 日期 / 时间 / 农历 / 数字大写 / Unicode / 部件拆字</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">4</code></td>
      <td>常用语快查（继续输编码可过滤）</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">5</code></td>
      <td>原符号输入，还原原版 <code class="language-plaintext highlighter-rouge">v</code> 模式（<code class="language-plaintext highlighter-rouge">v</code> <code class="language-plaintext highlighter-rouge">2</code> → 二 贰 ² ₂ Ⅱ）</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">v</code> + 回车</td>
      <td>直接打出字母 <code class="language-plaintext highlighter-rouge">v</code>（中文模式下想输 v 不用切英文）</td>
    </tr>
  </tbody>
</table>

<p>几个细节是踩过坑才加上的：菜单开着时 <code class="language-plaintext highlighter-rouge">Ctrl+C</code> / <code class="language-plaintext highlighter-rouge">Ctrl+V</code> / <code class="language-plaintext highlighter-rouge">Ctrl+A</code> <strong>原样交给程序</strong>（以前会误开菜单）；敲太快的连击会被<strong>防误触</strong>吞掉，默认 30ms 阈值，设置窗口里可调；打网址或 Windows 路径时 <code class="language-plaintext highlighter-rouge">。</code> 自动变 <code class="language-plaintext highlighter-rouge">.</code>、<code class="language-plaintext highlighter-rouge">、</code> 自动变 <code class="language-plaintext highlighter-rouge">\</code>，不用切英文。</p>

<h2 id="打字体验的三件小事">打字体验的三件小事</h2>

<p><strong>候选框</strong>：默认一行 9 个候选，按 <code class="language-plaintext highlighter-rouge">↓</code> 展开成 <strong>4 行 × 9 列</strong>的方格，再按 <code class="language-plaintext highlighter-rouge">↑</code> 收起；长英文候选自动截断，不会把候选栏挤爆。</p>

<p><strong>下一个候选词预测</strong>：基于 12.5MB 的字级二元统计（<code class="language-plaintext highlighter-rouge">predict-bigram.txt</code>），上一个词直接把下一个词推到候选里 —— 写句子时少敲几次。</p>

<p><strong>前后鼻音模糊</strong>：<code class="language-plaintext highlighter-rouge">an/ang</code>、<code class="language-plaintext highlighter-rouge">en/eng</code>、<code class="language-plaintext highlighter-rouge">in/ing</code>、<code class="language-plaintext highlighter-rouge">ian/iang</code>、<code class="language-plaintext highlighter-rouge">uan/uang</code> 五对<strong>逐对开关</strong>，在设置窗口里勾选，不用改 yaml。北方方言区打字再也不用纠结有没有那个 <code class="language-plaintext highlighter-rouge">g</code>。</p>

<p><strong>词库</strong>：rime-ice 基线（含大词库与 emoji 修正）+ 你自己的个人词库和常用语。常用语在正常打字时输编码前 3 位就会出现在候选里，也能 <code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">4</code> 主动查。</p>

<h2 id="语音输入本地推理文件不出本机">语音输入：本地推理，文件不出本机</h2>

<p>这是整套里最「重」的功能，也是我最常用的一个：</p>

<ul>
  <li><strong>按住 <code class="language-plaintext highlighter-rouge">Ctrl+Win</code> 说话，松开即上屏</strong>（快捷键在设置窗口「语音输入」页可改）；</li>
  <li>流式输出：说话过程中就能看到文字逐步出来，不用等说完；</li>
  <li>模型是 <strong>Qwen3-ASR 0.6B</strong>，量化后两个文件共 <strong>971MB</strong>（<code class="language-plaintext highlighter-rouge">Q8_0</code> 主模型 767MB + <code class="language-plaintext highlighter-rouge">mmproj</code> 205MB），随 exe 和 zip 一起发；</li>
  <li>推理走随包附带的 <strong>llama.cpp CPU 运行时</strong>，首字约 <strong>1~3 秒</strong>，全程离线 —— 不联网、不注册、不计调用次数；</li>
  <li>有 NVIDIA 显卡的话，把 llama.cpp 官方 CUDA 构建的 <code class="language-plaintext highlighter-rouge">llama-server.exe</code> 覆盖进安装目录的 <code class="language-plaintext highlighter-rouge">llama.cpp\</code> 就能提速；</li>
  <li>语音用完它自己会把 <code class="language-plaintext highlighter-rouge">llama-server.exe</code> 停掉（这一步是为安装器准备的：不把它停掉，覆盖安装时模型文件会被占用）。</li>
</ul>

<p>另外还带一个 <code class="language-plaintext highlighter-rouge">语音输入.bat</code> 命令行版：说完回车，2 秒内自动粘贴，不带悬浮球。</p>

<h2 id="设置窗口与后台常驻">设置窗口与后台常驻</h2>

<p>我不想每改一个配置都去手编辑 yaml，所以做了一个<strong>原生设置窗口</strong>（<code class="language-plaintext highlighter-rouge">VMenuSettings.exe</code>，C# WinForms，无依赖）：</p>

<ul>
  <li>词库管理（加词 / 删词 / 常用语编辑）、剪贴板历史列表、模糊音开关、语音快捷键、防误触阈值、候选词预测开关，改完<strong>立刻生效，不用重启</strong>；</li>
  <li>进程是<strong>常驻</strong>的，所以 <code class="language-plaintext highlighter-rouge">v</code> → <code class="language-plaintext highlighter-rouge">1</code> 是秒开；右键托盘 →「输入法设置 (S)」打开实测 <strong>0.2~0.3 秒</strong>；</li>
  <li>内存占用：设置窗口约 17MB，守护与剪贴板同步各约 1MB。不想常驻可以 <code class="language-plaintext highlighter-rouge">VMenu.exe stop</code>；</li>
  <li>自带 <strong><code class="language-plaintext highlighter-rouge">--hotkeytest</code></strong> 自检命令，装完可以验证热键注册是否正常。</li>
</ul>

<h2 id="安装两种包功能完全一致">安装：两种包，功能完全一致</h2>

<div style="border:1px solid #E8E8E8;border-radius:12px;padding:24px;margin:24px 0;background:#FFFFFF;">
<div style="font-size:16px;font-weight:700;color:#262626;margin-bottom:4px;">Rime VMenu 全家桶 1.0.0 · 下载</div>
<div style="font-size:13px;color:#8C8C8C;margin-bottom:16px;">Windows 10/11 x64 · 不需要管理员权限 · 内含 971MB 语音模型</div>
<div style="margin-bottom:16px;">
<a href="https://github.com/SeanWang114514/weasel-vmenu-suite/releases/download/v1.0.0/RimeVMenu-Setup-1.0.0.exe" style="display:inline-block;background:#1677FF;color:#FFFFFF;padding:10px 24px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;margin-right:12px;margin-bottom:8px;">⬇ 下载 exe 直装包（1,195,182,480 字节）</a>
<a href="https://github.com/SeanWang114514/weasel-vmenu-suite/releases/download/v1.0.0/RimeVMenu-1.0.0.zip" style="display:inline-block;background:#FFFFFF;color:#595959;padding:9px 24px;border-radius:6px;text-decoration:none;font-size:14px;border:1px solid #D9D9D9;margin-right:12px;margin-bottom:8px;">⬇ 下载 rime 导入 zip（1,199,917,490 字节）</a>
<a href="https://github.com/SeanWang114514/weasel-vmenu-suite" style="display:inline-block;background:#FFFFFF;color:#595959;padding:9px 24px;border-radius:6px;text-decoration:none;font-size:14px;border:1px solid #D9D9D9;margin-bottom:8px;">查看项目源码</a>
</div>
<div style="font-size:12px;color:#8C8C8C;">项目地址：<a href="https://github.com/SeanWang114514/weasel-vmenu-suite" style="color:#1677FF;">github.com/SeanWang114514/weasel-vmenu-suite</a>　·　下载地址：<a href="https://github.com/SeanWang114514/weasel-vmenu-suite/releases" style="color:#1677FF;">/releases</a></div>
</div>

<p><strong>方式 A：exe 直装（推荐）</strong> —— 双击 <code class="language-plaintext highlighter-rouge">RimeVMenu-Setup-1.0.0.exe</code>，安装目录<strong>默认就是你的 Rime 用户目录</strong>（注册表 <code class="language-plaintext highlighter-rouge">RimeUserDir</code>，通常是 <code class="language-plaintext highlighter-rouge">%APPDATA%\Rime</code>），装完自动收尾：注册开机自启、装托盘入口、启动后台服务、<strong>重新部署输入法</strong>。没装小狼毫也没关系，安装器会引导你先跑随包附带的 Weasel 0.17.4 安装器。</p>

<p><strong>方式 B：zip + 一键安装</strong> —— 解压到任意位置，双击解压目录里的 <code class="language-plaintext highlighter-rouge">安装.bat</code>，它会把整包复制进 Rime 用户目录并执行与 exe 相同的收尾步骤。</p>

<p><strong>方式 C：官方 <code class="language-plaintext highlighter-rouge">rime-install</code> 导入（只更新配置）</strong> —— 小狼毫自带的包安装器能直接吃这个 zip：</p>

<div class="language-bat highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre><span class="s2">"C:\Program Files\Rime\weasel-0.17.x\rime-install.bat"</span> <span class="kd">C</span>:\RimePkg\RimeVMenu<span class="o">-</span><span class="m">1</span>.0.0.zip
</pre></td></tr></tbody></table></code></pre></div></div>

<p>两个实测出来的边界要知道：<strong>zip 路径里不能有空格、也不能加引号</strong>（否则 <code class="language-plaintext highlighter-rouge">rime-install.bat</code> 自己会报 batch 语法错，或把参数误判成包名去 GitHub 下载）；而且官方规则<strong>只复制顶层 <code class="language-plaintext highlighter-rouge">*.yaml</code>、<code class="language-plaintext highlighter-rouge">*.txt</code> 和 <code class="language-plaintext highlighter-rouge">opencc\</code></strong>，不带 <code class="language-plaintext highlighter-rouge">lua\</code>、<code class="language-plaintext highlighter-rouge">cn_dicts\</code> 和外挂 exe —— 所以它适合给已部署好的机器覆盖更新配置，<strong>全新安装请用方式 A 或 B</strong>。</p>

<p><strong>校验</strong>（<code class="language-plaintext highlighter-rouge">Get-FileHash 文件 -Algorithm SHA256</code>）：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
</pre></td><td class="rouge-code"><pre>RimeVMenu-Setup-1.0.0.exe   469B39DC81394DD26DAF96EBE377FBA52DD2B8D8991AC40EA1BF92C5EBE5B586
RimeVMenu-1.0.0.zip         7FC46D27EFD936FD0BBBD2AEF155AC7570D15DBDDD25203606CC254170A87B6E
</pre></td></tr></tbody></table></code></pre></div></div>

<p><strong>卸载</strong>：控制面板 → 卸载「RimeVMenu 全家桶」，会停掉后台服务、还原托盘菜单改动、删除安装的文件 —— <strong>你自己的词库、常用语和剪贴板历史会保留</strong>（这一点是实测过的，不是写写而已）。</p>

<p>装完之后随便找个输入框打 <code class="language-plaintext highlighter-rouge">v</code>，菜单出来就是成功了。</p>

<h2 id="从源码构建">从源码构建</h2>

<div class="language-bat highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="kd">git</span> <span class="kd">clone</span> <span class="kd">https</span>://github.com/SeanWang114514/weasel<span class="na">-vmenu-suite</span>.git
<span class="nb">cd</span> <span class="kd">weasel</span><span class="na">-vmenu-suite
</span>下载Qwen模型.bat                                :: 拉两个模型（&gt;100MB，不进 <span class="kd">git</span>）
<span class="kd">powershell</span> <span class="na">-ExecutionPolicy </span><span class="kd">Bypass</span> <span class="na">-File </span><span class="kd">packaging</span>\build<span class="na">-release</span>.ps1
</pre></td></tr></tbody></table></code></pre></div></div>

<p>产物落在 <code class="language-plaintext highlighter-rouge">out\</code>，就是上面那两个包。构建脚本支持 <code class="language-plaintext highlighter-rouge">-NoModels</code>（跳过 971MB 模型，冒烟测试用）、<code class="language-plaintext highlighter-rouge">-SkipZip</code>、<code class="language-plaintext highlighter-rouge">-SkipExe</code>；打 exe 直装包需要 <a href="https://jrsoftware.org/isinfo.php">Inno Setup 6</a>。仓库里有 <code class="language-plaintext highlighter-rouge">.gitattributes</code> 把 <code class="language-plaintext highlighter-rouge">.bat</code> / <code class="language-plaintext highlighter-rouge">.ps1</code> 锁成 CRLF，clone 下来不用手动改换行符。</p>

<h2 id="已知限制">已知限制</h2>

<p>不想给用户挖坑，几条实打实的：</p>

<ul>
  <li><strong>方向键不能移动选中项</strong>（只有 <code class="language-plaintext highlighter-rouge">↓</code> / <code class="language-plaintext highlighter-rouge">↑</code> 展开收起），选词用数字键或空格 —— 小狼毫的 Lua 接口没有这个能力；</li>
  <li>语音走 CPU 推理，<strong>首字 1~3 秒</strong>是正常速度，想快就换 CUDA 版 <code class="language-plaintext highlighter-rouge">llama-server.exe</code>；</li>
  <li>剪贴板多行内容会被压平成一行（缓存格式一行一条）；</li>
  <li>小狼毫<strong>升级 / 修复安装</strong>会把托盘右键菜单那一项退回原样，重跑一次安装脚本即可恢复；</li>
  <li>常用语的「打字命中」只在中文模式生效，编码至少要 3 位。</li>
</ul>

<p>完整清单在仓库的 <code class="language-plaintext highlighter-rouge">使用说明.md</code> 里。</p>

<h2 id="开源与致谢">开源与致谢</h2>

<p>本项目站在这些项目肩膀上：</p>

<ul>
  <li><a href="https://github.com/rime/weasel">Weasel（小狼毫）</a> 与 <a href="https://github.com/rime/librime">librime</a> — 输入法宿主与核心引擎</li>
  <li><a href="https://github.com/iDvel/rime-ice">rime-ice</a> — 词库与方案基线</li>
  <li><a href="https://github.com/ggml-org/llama.cpp">llama.cpp</a> — CPU 推理运行时</li>
  <li><a href="https://huggingface.co/ggml-org/Qwen3-ASR-0.6B-GGUF">Qwen3-ASR</a> — 语音识别模型</li>
  <li><a href="https://github.com/BYVoid/OpenCC">OpenCC</a> — 简繁转换</li>
</ul>

<p>这些组件<strong>保留各自原有许可</strong>，详见仓库 <code class="language-plaintext highlighter-rouge">README.md</code>。</p>

<h2 id="写在最后">写在最后</h2>

<p>这个套件没有「改变输入方式」的野心，它只是把我用了几年小狼毫攒下的那些顺手的小改进，打包成<strong>双击就能装好</strong>的一份东西：一个 <code class="language-plaintext highlighter-rouge">v</code> 出菜单，一个窗口管配置，一个快捷键把想说的话变成字，而且全程不联网。</p>

<p>两种包任选，功能完全一致：</p>

<ul>
  <li><strong>项目地址</strong>：<a href="https://github.com/SeanWang114514/weasel-vmenu-suite">github.com/SeanWang114514/weasel-vmenu-suite</a></li>
  <li><strong>下载地址</strong>：<a href="https://github.com/SeanWang114514/weasel-vmenu-suite/releases/tag/v1.0.0">github.com/SeanWang114514/weasel-vmenu-suite/releases/tag/v1.0.0</a></li>
</ul>

<p>欢迎下载体验，也欢迎到仓库提 issue 或点个 star。</p>]]></content><author><name>Sean Wang</name></author><category term="工具" /><category term="输入法" /><category term="Rime" /><category term="语音输入" /><category term="Lua" /><summary type="html"><![CDATA[把小狼毫（Weasel）升级成一套完整的输入工具箱：按 v 出功能菜单，可视化窗口管词库与配置，剪贴板历史随手调用，按住 Ctrl+Win 就能说话输入 —— 全程离线，不需要管理员权限。]]></summary></entry><entry><title type="html">Note Studio：把 PDF 改字、OCR 和语音识别装进一个本地工作台</title><link href="https://seanwang114514.github.io/Personal-blog/2026/09/19/note-studio/" rel="alternate" type="text/html" title="Note Studio：把 PDF 改字、OCR 和语音识别装进一个本地工作台" /><published>2026-09-19T22:00:00+00:00</published><updated>2026-09-19T22:00:00+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/2026/09/19/note-studio</id><content type="html" xml:base="https://seanwang114514.github.io/Personal-blog/2026/09/19/note-studio/"><![CDATA[<blockquote>
  <p>一个基于 React + Electron 的本地文档工作台：PDF 能像 Word 一样逐字改，批注文本框自带格式栏，手写 OCR 与语音识别都在本机推理 —— 改完直接写回原文件。</p>
</blockquote>

<div style="display:flex;gap:12px;flex-wrap:wrap;margin:24px 0 0;">
<a href="https://github.com/SeanWang114514/note-studio" style="display:inline-flex;align-items:center;gap:8px;background:#24292e;color:#fff;padding:10px 20px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,0.2);">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" /></svg>
Star on GitHub
</a>
<a href="https://github.com/SeanWang114514/note-studio/releases" style="display:inline-flex;align-items:center;gap:8px;background:#1677FF;color:#fff;padding:10px 20px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,0.2);">
⬇ 下载 Windows exe（251MB）
</a>
</div>

<div style="border:1px solid #E8E8E8;border-left:4px solid #1677FF;border-radius:8px;padding:16px 20px;margin:24px 0;background:#F0F5FF;">
<div style="font-size:15px;font-weight:600;color:#262626;margin-bottom:4px;">快速下载</div>
<div style="font-size:13px;color:#595959;">在 <a href="https://github.com/SeanWang114514/note-studio/releases" style="color:#1677FF;">GitHub Releases</a> 下载 <code>Note-Studio-0.1.13-Windows.exe</code>，单文件、免安装，双击即用（约 251MB）；同一 Release 下还有 Android 版 <code>app-debug.apk</code>。项目源码：<a href="https://github.com/SeanWang114514/note-studio" style="color:#1677FF;">note-studio</a>。</div>
</div>

<!--more-->

<h2 id="为什么做这个">为什么做这个</h2>

<p>“帮我改一个字”听起来是文档处理里最基本的需求，但真做起来处处是墙。</p>

<p>只读的阅读器改不了内容；系统自带的预览看完就关，批注也存不回文件。能真正编辑 PDF 的商业软件是订阅制，一年几百块，而且导出的文件在别的阅读器里打开，字体和排版经常变样。在线工具倒是免费，但第一步就要把文件传上去——如果手上是合同、论文、成绩单或者身份证扫描件，光是想一想”这份东西要进别人的服务器”，多半就放弃了。</p>

<p>至于手写识别和语音输入，那又是另外两个工具：要联网、要注册、有调用次数限制，识别完还要手动把文字复制回来。</p>

<p>所以我想做一个<strong>打开就能改、改完就存回原文件、识别在本机跑</strong>的工作台。这就是 Note Studio。</p>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 374" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Note Studio 三步：打开八种格式、直接编辑、写回原文件">
<defs>
<marker id="ns1-arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><polygon points="0 0, 8 4, 0 8" fill="#BFBFBF" /></marker>
</defs>
<rect x="1" y="1" width="718" height="372" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="32" y="38" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="20" font-weight="700" fill="#262626">Note Studio</text>
<text x="32" y="60" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#8C8C8C">本地文档工作台 · 八种格式 · 编辑 / 批注 / 识别</text>
<rect x="534" y="24" width="154" height="30" rx="15" fill="#E6F4FF" />
<text x="611" y="44" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#1677FF">Windows · Web · Android</text>
<line x1="32" y1="76" x2="688" y2="76" stroke="#F0F0F0" />
<!-- Step 1 -->
<rect x="32" y="96" width="202" height="180" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="52" y="124" font-family="system-ui, sans-serif" font-size="11" font-weight="600" fill="#8C8C8C">STEP 01</text>
<rect x="52" y="136" width="44" height="44" rx="8" fill="#E6F4FF" />
<rect x="62" y="147" width="24" height="28" rx="2" fill="none" stroke="#1677FF" stroke-width="1.5" />
<line x1="67" y1="155" x2="81" y2="155" stroke="#1677FF" stroke-width="1.5" />
<line x1="67" y1="162" x2="81" y2="162" stroke="#1677FF" stroke-width="1.5" />
<line x1="67" y1="169" x2="75" y2="169" stroke="#1677FF" stroke-width="1.5" />
<text x="52" y="200" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">打开常见文档</text>
<text x="52" y="221" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">PDF / Word / Markdown</text>
<text x="52" y="240" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">Excel / EPUB / TXT</text>
<text x="52" y="259" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">PPT / CAJ（白板批注）</text>
<!-- Step 2 -->
<rect x="259" y="96" width="202" height="180" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="279" y="124" font-family="system-ui, sans-serif" font-size="11" font-weight="600" fill="#8C8C8C">STEP 02</text>
<rect x="279" y="136" width="44" height="44" rx="8" fill="#E6F4FF" />
<line x1="301" y1="146" x2="301" y2="170" stroke="#1677FF" stroke-width="2" />
<line x1="295" y1="146" x2="307" y2="146" stroke="#1677FF" stroke-width="2" />
<line x1="295" y1="170" x2="307" y2="170" stroke="#1677FF" stroke-width="2" />
<text x="279" y="200" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">直接改内容</text>
<text x="279" y="221" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">PDF 逐字编辑 / 批注</text>
<text x="279" y="240" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">文本框格式栏</text>
<text x="279" y="259" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">新建一页 / 撤销</text>
<!-- Step 3 -->
<rect x="486" y="96" width="202" height="180" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="506" y="124" font-family="system-ui, sans-serif" font-size="11" font-weight="600" fill="#8C8C8C">STEP 03</text>
<rect x="506" y="136" width="44" height="44" rx="8" fill="#E6F4FF" />
<line x1="528" y1="145" x2="528" y2="163" stroke="#1677FF" stroke-width="2" />
<polyline points="521,156 528,164 535,156" fill="none" stroke="#1677FF" stroke-width="2" />
<line x1="516" y1="170" x2="540" y2="170" stroke="#1677FF" stroke-width="2" />
<text x="506" y="200" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">落回原文件</text>
<text x="506" y="221" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">写回 PDF / .docx</text>
<text x="506" y="240" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">批注随文件保存</text>
<text x="506" y="259" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">OCR / 语音插到光标</text>
<line x1="238" y1="186" x2="255" y2="186" stroke="#BFBFBF" stroke-width="1.5" marker-end="url(#ns1-arrow)" />
<line x1="465" y1="186" x2="482" y2="186" stroke="#BFBFBF" stroke-width="1.5" marker-end="url(#ns1-arrow)" />
<rect x="32" y="296" width="656" height="52" rx="8" fill="#F5F5F5" />
<text x="360" y="327" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#595959">识别在本机推理 · 批注随文件走 · 没有一步需要联网上传</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 1 · 从打开到落盘的三个动作，全程在本机完成</p>

<h2 id="它能打开什么">它能打开什么</h2>

<p>支持八种常见格式，每种都对应一个专门写的视图，而不是”统一转成 HTML 再说”：</p>

<table>
  <thead>
    <tr>
      <th>格式</th>
      <th>打开后是什么</th>
      <th>能做的编辑</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><strong>PDF</strong></td>
      <td>连续滚动阅读器：即时缩放、单页 / 连续切换、缩略图栏、文字层可选可搜</td>
      <td>逐字编辑、批注、文本框、写回 PDF</td>
    </tr>
    <tr>
      <td><strong>Word（.doc / .docx）</strong></td>
      <td>排版保真渲染</td>
      <td>改文字、批注、保存回 <code class="language-plaintext highlighter-rouge">.docx</code></td>
    </tr>
    <tr>
      <td><strong>Markdown（.md）</strong></td>
      <td>块编辑器 + 实时预览</td>
      <td>改文字，防抖自动保存</td>
    </tr>
    <tr>
      <td><strong>纯文本（.txt）</strong></td>
      <td>纯文本视图</td>
      <td>光标处插入、换页符分页</td>
    </tr>
    <tr>
      <td><strong>Excel（.xls / .xlsx）</strong></td>
      <td>工作表视图</td>
      <td>改单元格、新建工作表</td>
    </tr>
    <tr>
      <td><strong>EPUB</strong></td>
      <td>章节渲染，图片与链接照常工作</td>
      <td>改正文、追加章节</td>
    </tr>
    <tr>
      <td><strong>PPT（.ppt / .pptx）</strong></td>
      <td>可批注白板</td>
      <td>批注、翻页</td>
    </tr>
    <tr>
      <td><strong>CAJ</strong></td>
      <td>占位视图 + 白板</td>
      <td>批注（知网专有格式，需先转 PDF 才能预览）</td>
    </tr>
  </tbody>
</table>

<p>除此之外还有几件日常会用到的事：</p>

<ul>
  <li><strong>最近打开</strong>：主页保留最近五个文件的卡片，下次直接点开；文件权限过期会提示重新授权，而不是默默失败。</li>
  <li><strong>标签页</strong>：多个文件叠着开，不用来回找窗口。</li>
  <li><strong>文字识别 / 语音识别</strong>：两个按钮都在右上角，识别结果直接插进文档光标处。</li>
</ul>

<h2 id="三种改文档的手感">三种「改文档」的手感</h2>

<h3 id="一pdf-改字像-word-一样">一、PDF 改字，像 Word 一样</h3>

<p>这是整个项目里最花功夫的部分。PDF 在格式上根本没有”段落”这个概念，只有一堆各自独立定位的文本片段，所以大多数工具的选择是——不给你改，或者让你贴一个文本框盖上去。</p>

<p>Note Studio 走的是另一条路：把相邻的行按字号、行距、对齐方式<strong>自动聚合成一个连续段落</strong>，然后在段落上叠一个精确对齐的编辑框。</p>

<ul>
  <li><strong>单击左键</strong>在文字任意位置定位光标，直接输入、退格删除，所见即所得；</li>
  <li><strong>鼠标拖拽跨行多选</strong>，选中的文字可以整体删除或替换；</li>
  <li><strong>段落内文字是连起来的</strong>：回车在段落内换行，不会出现”每行一个独立编辑框”的割裂感；</li>
  <li>字体、字号、加粗、斜体、下划线、颜色、左中右对齐都在工具栏上；</li>
  <li><code class="language-plaintext highlighter-rouge">Enter</code> 换行、<code class="language-plaintext highlighter-rouge">Esc</code> 取消、<code class="language-plaintext highlighter-rouge">Ctrl + S</code> 保存，点页面别处自动提交（和 Word 一个脾气）。</li>
</ul>

<p>保存的时候<strong>是真的写回 PDF 文件本身</strong>，不是存一份”编辑记录”下次再叠上去：纯 ASCII 文字用矢量字体直接写进内容流，中文和任意系统字体则渲染成高清 PNG 嵌入（先用白底覆盖原文，再画上新文字）。任何阅读器打开都能看到结果。</p>

<h3 id="二批注文本框自带-word-式格式栏">二、批注文本框，自带 Word 式格式栏</h3>

<p>点工具栏的「文本框」按钮，工具条会<strong>自动多出一行文字格式栏</strong>——字体、字号、加粗 / 斜体 / 下划线、对齐、五个色块加自定义颜色。</p>

<p>这里有个值得说的设计取舍：<strong>选中某个文本框时</strong>，格式栏改的是那个框（和 Word 改选区一样）；<strong>没选中时</strong>，它改的是”新建文本框的默认样式”，栏首会写清楚现在改的是哪一种。而且这排控件是常驻的，点画布、点别处都不会把它关掉。</p>

<p>之所以强调这点，是因为它最早藏在”再点一次工具按钮 / 双击 / 右键”后面，用户根本找不到，反馈就是”没有 Word 那样能选字体字号的界面”。功能都在，但发现不了就等于没有——这条教训现在写进了项目文档里。</p>

<h3 id="三新建一页和删除新建页">三、「新建一页」和「删除新建页」</h3>

<p>给文档加一页，听起来是个按钮的事，但”一页”在各格式里的含义完全不同：</p>

<table>
  <thead>
    <tr>
      <th>格式</th>
      <th>「新建一页」做的</th>
      <th>「删除新建页」做的</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>PDF</td>
      <td>末尾追加一张真实空白页（改文档结构）</td>
      <td>删掉末尾那一页</td>
    </tr>
    <tr>
      <td>Word（.docx）</td>
      <td>文末插入 Word 分页符</td>
      <td>移掉文末那个分页标记</td>
    </tr>
    <tr>
      <td>Markdown</td>
      <td>追加 <code class="language-plaintext highlighter-rouge">\pagebreak</code> 分页块 + 空段落</td>
      <td>按块 id 移掉这两块</td>
    </tr>
    <tr>
      <td>EPUB</td>
      <td>书末追加一个新章节（登记进 OPF）</td>
      <td>把新章节移出书末，OPF 里也不再登记</td>
    </tr>
    <tr>
      <td>Excel</td>
      <td>新建一张工作表</td>
      <td>删掉那张工作表</td>
    </tr>
    <tr>
      <td>纯文本</td>
      <td>在光标处插入换页符 <code class="language-plaintext highlighter-rouge">^L</code></td>
      <td>移除刚插入的换页符</td>
    </tr>
    <tr>
      <td>PPT / CAJ / 未知</td>
      <td>白板后面追加一张空白页</td>
      <td>页数退回”本次会话第一次加页前”的值</td>
    </tr>
  </tbody>
</table>

<p>配套的「删除新建页」有两个关键约束：</p>

<p><strong>只删自己这一会话里新建的页，文件原有的页一张都不会少。</strong> 没点过「新建一页」时按钮是灰的；白板格式还额外受”文件原有页数”这个下界保护。而且是后进先出——连点两次新建就要连点两次删除，换文件后记账清零。</p>

<p><strong>二级确定，但不弹窗。</strong> 弹一个模态框问”确定要删除吗”是最容易让人烦躁的做法，尤其是删除本身只是撤销自己刚做的操作。所以这里用的是”上膛”：</p>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 252" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="删除新建页的两级确认：置灰、上膛、执行">
<defs>
<marker id="ns2-arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><polygon points="0 0, 8 4, 0 8" fill="#BFBFBF" /></marker>
</defs>
<rect x="1" y="1" width="718" height="250" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="32" y="38" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="15" font-weight="700" fill="#262626">「删除新建页」的两级确认</text>
<text x="688" y="38" text-anchor="end" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">误点一下不会删掉任何东西</text>
<line x1="32" y1="54" x2="688" y2="54" stroke="#F0F0F0" />
<rect x="32" y="86" width="200" height="56" rx="8" fill="#FAFAFA" stroke="#F0F0F0" />
<text x="132" y="120" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#BFBFBF">删除新建页</text>
<text x="132" y="166" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">没点过「新建一页」→ 置灰</text>
<rect x="260" y="86" width="200" height="56" rx="8" fill="#FFF1F0" stroke="#FFA39E" />
<text x="360" y="120" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#CF1322">确认删除</text>
<text x="360" y="166" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">第一次点击 → 红底「上膛」</text>
<rect x="488" y="86" width="200" height="56" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="588" y="120" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#262626">已删除 1 页</text>
<text x="588" y="166" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">3 秒内再点一次 → 真正执行</text>
<line x1="236" y1="114" x2="254" y2="114" stroke="#BFBFBF" stroke-width="1.5" marker-end="url(#ns2-arrow)" />
<line x1="464" y1="114" x2="482" y2="114" stroke="#BFBFBF" stroke-width="1.5" marker-end="url(#ns2-arrow)" />
<rect x="32" y="192" width="656" height="44" rx="8" fill="#F5F5F5" />
<text x="360" y="219" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">失焦 / 超过 3 秒 / 按钮被置灰 → 自动收回，退回灰色状态</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 2 · 两级确认的三个状态：置灰、上膛、执行</p>

<p>第一次点击只是”上膛”——按钮变成红底的「确认删除」，<strong>3 秒内再点一次</strong>才真的执行；期间点到别处（失焦）、超时、按钮被置灰，都会自动收回。挨着「新建一页」的按钮误点一下，什么都不会发生。</p>

<h2 id="本机-ai手写就认说话就写字">本机 AI：手写就认，说话就写字</h2>

<p>两个识别功能都是纯本地的，不联网、不上传、没有调用次数。</p>

<h3 id="手写--图片-ocr">手写 / 图片 OCR</h3>

<p>点右上角「文字识别」弹出画板：可以直接用手写（鼠标、触屏、数位板都行），也可以 <code class="language-plaintext highlighter-rouge">Ctrl + V</code> 粘贴截图、或者上传一张图片识别印刷文字。</p>

<ul>
  <li>模型可选：<strong>PP-OCRv5_mobile</strong>（轻量通用，适合手写）或 <strong>PP-OCRv6 small</strong>（精度更高，适合印刷体）；</li>
  <li>推理在<strong>本机浏览器里跑</strong>（PaddleOCR.js + ONNX Runtime Web），图片不出本机，模型已内置到 <code class="language-plaintext highlighter-rouge">public/models/</code>；</li>
  <li>识别完点「插入到文档」，文字会<strong>完整插入到打开弹窗前光标所在的位置</strong>——没选光标就插到文末，Excel 写进当前选中的单元格；</li>
  <li>还有两个开关：「整理为一行」（把多行合并成一行）和「去除空格」，对显示、复制、插入同时生效。</li>
</ul>

<p>手写识别对书写工整度敏感，写大一点、笔画清楚一些，效果明显更好。</p>

<h3 id="离线语音识别">离线语音识别</h3>

<p>点「语音识别」弹出一个小窗口：中间是麦克风按钮，下方一排竖向滚动条实时显示音量与频率分布。</p>

<ul>
  <li>停止说话约 <strong>1.6 秒</strong>自动结束录音并输出结果（也可以手动点麦克风，或到 60 秒上限）；</li>
  <li>识别文字直接显示在弹窗里，<strong>点着就能改</strong>，不需要额外的编辑按钮；</li>
  <li>两个模型可选：<strong>Vosk</strong>（默认，vosk-browser + Kaldi 编译成 WebAssembly，浏览器内离线识别、流式出中间结果）——中文小模型约 42MB 已内置，开箱即用；<strong>Qwen3-ASR</strong>（官方 <code class="language-plaintext highlighter-rouge">qwen-asr</code> 包 + FastAPI 本地服务，精度更高，CPU / GPU 都能跑）；</li>
  <li>音频不出本机；点「发送」同样插到光标处。</li>
</ul>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 386" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="技术架构：文档引擎、本机 AI 引擎与三端产物">
<defs>
<marker id="ns3-arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><polygon points="0 0, 8 4, 0 8" fill="#8C8C8C" /></marker>
</defs>
<rect x="1" y="1" width="718" height="384" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="32" y="38" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="15" font-weight="700" fill="#262626">技术架构 · 三端同源，AI 在本机推理</text>
<text x="688" y="38" text-anchor="end" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">全程离线 · 文件不上传</text>
<line x1="32" y1="54" x2="688" y2="54" stroke="#F0F0F0" />
<!-- Left panel -->
<rect x="32" y="66" width="10" height="10" rx="2" fill="#1677FF" />
<text x="50" y="79" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">文档引擎</text>
<rect x="238" y="66" width="114" height="22" rx="11" fill="#F5F5F5" />
<text x="295" y="81" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">浏览器内运行</text>
<rect x="32" y="100" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="60" cy="126" r="11" fill="#1677FF" />
<text x="60" y="130" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="#FFFFFF">1</text>
<text x="80" y="121" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">PDF 渲染</text>
<text x="336" y="121" text-anchor="end" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">pdfjs-dist</text>
<text x="80" y="140" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">连续滚动 · 惰性渲染 · 即时缩放</text>
<line x1="60" y1="152" x2="60" y2="162" stroke="#D9D9D9" stroke-width="1.5" />
<rect x="32" y="162" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="60" cy="188" r="11" fill="#1677FF" />
<text x="60" y="192" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="#FFFFFF">2</text>
<text x="80" y="183" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">PDF 写回</text>
<text x="336" y="183" text-anchor="end" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">pdf-lib</text>
<text x="80" y="202" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">改文档结构，不是叠一层覆盖</text>
<line x1="60" y1="214" x2="60" y2="224" stroke="#D9D9D9" stroke-width="1.5" />
<rect x="32" y="224" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="60" cy="250" r="11" fill="#1677FF" />
<text x="60" y="254" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="#FFFFFF">3</text>
<text x="80" y="245" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">格式解析</text>
<text x="336" y="245" text-anchor="end" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">mammoth · SheetJS</text>
<text x="80" y="264" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">docx / xlsx / epub / markdown</text>
<!-- Right panel -->
<rect x="368" y="66" width="10" height="10" rx="2" fill="#52C41A" />
<text x="386" y="79" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">本机 AI</text>
<rect x="568" y="66" width="120" height="22" rx="11" fill="#F5F5F5" />
<text x="628" y="81" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">离线推理</text>
<rect x="368" y="100" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="126" r="4" fill="#52C41A" />
<text x="410" y="121" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">手写 / 图片 OCR</text>
<text x="410" y="140" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">PaddleOCR.js · ONNX Runtime Web</text>
<rect x="368" y="162" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="188" r="4" fill="#52C41A" />
<text x="410" y="183" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">离线语音识别</text>
<text x="410" y="202" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">vosk-browser（WASM，模型内置）</text>
<rect x="368" y="224" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="250" r="4" fill="#52C41A" />
<text x="410" y="245" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">高精度 ASR（可选）</text>
<text x="410" y="264" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">Qwen3-ASR 本地 FastAPI 服务</text>
<!-- Bottom bar -->
<rect x="32" y="292" width="656" height="52" rx="8" fill="#F5F5F5" />
<rect x="48" y="302" width="180" height="32" rx="16" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="138" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#262626">Web 浏览器</text>
<line x1="238" y1="318" x2="258" y2="318" stroke="#8C8C8C" stroke-width="1.5" marker-end="url(#ns3-arrow)" />
<rect x="268" y="302" width="180" height="32" rx="16" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="358" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#262626">Windows exe</text>
<line x1="458" y1="318" x2="478" y2="318" stroke="#8C8C8C" stroke-width="1.5" marker-end="url(#ns3-arrow)" />
<rect x="488" y="302" width="180" height="32" rx="16" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="578" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#262626">Android APK</text>
<text x="360" y="366" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">同一份 dist/ 产物 · Electron portable · Capacitor</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 3 · 两块引擎都跑在本机，同一份代码产出 Web / Windows / Android 三个形态</p>

<h2 id="一套代码三端交付">一套代码，三端交付</h2>

<p>项目主体是 React + Vite，外面套两层壳：</p>

<ul>
  <li><strong>Web</strong>：<code class="language-plaintext highlighter-rouge">npm run dev</code> 或 <code class="language-plaintext highlighter-rouge">npm run build</code> 直接跑，浏览器里就能用（只是没有本地文件写入权限时，保存会退化）。</li>
  <li><strong>Windows</strong>：Electron + electron-builder 打成 <strong>portable 单文件 exe</strong>，双击即用、免安装。</li>
  <li><strong>Android</strong>：Capacitor 打包成 APK，触屏环境会自动启用一套独立的手势逻辑——单指滑动翻页、松手带惯性、按屏幕分辨率自动”适合宽度”，横竖屏切换后重新适配，批注栏默认折叠把宽度让给文档。桌面端（鼠标 + 键盘）完全不受影响。</li>
</ul>

<p>发版流程也是自动的：推一个 <code class="language-plaintext highlighter-rouge">v*</code> 标签，GitHub Actions 上三条流水线并行跑（Windows exe、Android debug APK、Android release APK），产物直接挂到 Release 上。</p>

<h3 id="单文件-exe-的启动速度是设计出来的">单文件 exe 的启动速度是设计出来的</h3>

<p>portable 形态是”自解压”的：<strong>每次双击都要先把整包解压到临时目录再启动，退出后再删掉</strong>，所以启动耗时几乎等于「解压耗时 + Electron 启动耗时」。当前配置专门为此做了四件事，实测（本机 NVMe SSD）：</p>

<table>
  <thead>
    <tr>
      <th>形态</th>
      <th>启动到窗口可见</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">Note-Studio-*-Windows.exe</code>（单文件便携版）</td>
      <td><strong>2.2 ~ 2.6 s</strong></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">win-unpacked/Note Studio.exe</code>（免解压目录版）</td>
      <td><strong>1.2 ~ 1.5 s</strong></td>
    </tr>
  </tbody>
</table>

<ol>
  <li><code class="language-plaintext highlighter-rouge">compression: "store"</code> —— 不压缩载荷。LZMA 解压大约 3 MB/s，一旦压缩，启动要 30 秒以上。</li>
  <li><code class="language-plaintext highlighter-rouge">portable.useZip: true</code> —— 走 NSIS 自带的 <code class="language-plaintext highlighter-rouge">File /r</code> 写文件，而不是 7z 插件解压（实测解压 1.87 s → 0.1 ~ 0.6 s）。</li>
  <li><code class="language-plaintext highlighter-rouge">electronLanguages: ["zh-CN", "en-US"]</code> —— 只保留两种语言包。</li>
  <li><code class="language-plaintext highlighter-rouge">files</code> 里的一串排除项 —— 渲染层依赖已经被 Vite 打进 <code class="language-plaintext highlighter-rouge">dist/</code>，<code class="language-plaintext highlighter-rouge">node_modules</code> 不需要进包；调试符号、未被引用的第三方副本也一并排掉。</li>
</ol>

<p>改动其中任意一条，启动都会明显变慢。另外：全新构建出来的 exe 第一次运行时，Windows Defender 会先对新文件做一次扫描，可能耗时十几秒；从第二次起才是上表的时间。</p>

<h2 id="界面按-apple-hig-重做了一遍">界面：按 Apple HIG 重做了一遍</h2>

<p>功能齐了之后，界面又整个重做了一遍，参照的是 Apple Human Interface Guidelines：</p>

<ul>
  <li><strong>层级靠材质与描边，不靠重阴影</strong>：侧边栏和工具栏用 vibrancy 半透明材质，内容区用标准背景，浮层用 popover 材质 + 一层柔和投影；</li>
  <li><strong>控件尺寸对齐规范</strong>：常规控件高 28pt，圆角 6 / 8 / 10 / 12 形成梯度，命中区不小于 28×28；窄屏（手机）单独一档，触控目标放大到 40pt 方形；</li>
  <li><strong>强调色只用于”可交互 / 已选中”</strong>：选中态、焦点环和主按钮用系统蓝，其余一律用中性色体系；</li>
  <li><strong>明暗两套主题跟随系统</strong>，不需要在应用里切来切去；</li>
  <li><strong>面板可以自由缩放和折叠</strong>：侧边栏、缩略图栏、批注栏都能拖宽、折叠收起，把屏幕让给文档；</li>
  <li><strong>批注层支持鼠标框选</strong>：一次框住多条批注，整组拖动或删除。</li>
</ul>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 280" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="浅色与深色外观对照：结构完全一致，只替换色板">
<!-- Light -->
<rect x="8" y="8" width="344" height="264" rx="12" fill="#FFFFFF" stroke="#D5D5D9" />
<circle cx="30" cy="28" r="3.5" fill="#FF5F57" />
<circle cx="42" cy="28" r="3.5" fill="#FEBC2E" />
<circle cx="54" cy="28" r="3.5" fill="#28C840" />
<text x="70" y="33" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#000000">Note Studio</text>
<rect x="280" y="18" width="56" height="22" rx="11" fill="#F2F2F7" />
<text x="308" y="33" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8E8E93">浅色</text>
<line x1="24" y1="46" x2="336" y2="46" stroke="#E5E5EA" />
<rect x="24" y="56" width="78" height="200" rx="8" fill="#F2F2F7" />
<rect x="34" y="80" width="58" height="8" rx="4" fill="#007AFF" />
<rect x="34" y="98" width="58" height="8" rx="4" fill="rgba(60,60,67,0.16)" />
<rect x="34" y="116" width="58" height="8" rx="4" fill="rgba(60,60,67,0.16)" />
<rect x="34" y="134" width="58" height="8" rx="4" fill="rgba(60,60,67,0.16)" />
<rect x="112" y="56" width="168" height="200" rx="8" fill="#FFFFFF" stroke="#E5E5EA" />
<rect x="128" y="76" width="110" height="9" rx="4" fill="rgba(0,0,0,0.72)" />
<rect x="128" y="98" width="136" height="7" rx="3.5" fill="rgba(60,60,67,0.24)" />
<rect x="128" y="114" width="136" height="7" rx="3.5" fill="rgba(60,60,67,0.24)" />
<rect x="128" y="130" width="96" height="7" rx="3.5" fill="rgba(60,60,67,0.24)" />
<rect x="126" y="146" width="140" height="24" rx="6" fill="#007AFF" fill-opacity="0.12" stroke="#007AFF" stroke-width="1.5" />
<text x="136" y="162" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="10" font-weight="600" fill="#007AFF">编辑中</text>
<rect x="128" y="184" width="136" height="7" rx="3.5" fill="rgba(60,60,67,0.24)" />
<rect x="128" y="200" width="80" height="7" rx="3.5" fill="rgba(60,60,67,0.24)" />
<rect x="290" y="56" width="46" height="200" rx="8" fill="#F2F2F7" />
<rect x="296" y="68" width="34" height="40" rx="6" fill="#FFFFFF" stroke="#E5E5EA" />
<rect x="301" y="78" width="24" height="5" rx="2.5" fill="rgba(60,60,67,0.28)" />
<rect x="301" y="89" width="16" height="5" rx="2.5" fill="rgba(60,60,67,0.16)" />
<rect x="296" y="116" width="34" height="40" rx="6" fill="#FFFFFF" stroke="#E5E5EA" />
<rect x="301" y="126" width="24" height="5" rx="2.5" fill="rgba(60,60,67,0.28)" />
<rect x="301" y="137" width="20" height="5" rx="2.5" fill="rgba(60,60,67,0.16)" />
<text x="180" y="270" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">侧边栏 #F2F2F7 · 强调色 #007AFF · 正文 #000000</text>
<!-- Dark -->
<rect x="368" y="8" width="344" height="264" rx="12" fill="#1C1C1E" stroke="#545458" />
<circle cx="390" cy="28" r="3.5" fill="#FF5F57" />
<circle cx="402" cy="28" r="3.5" fill="#FEBC2E" />
<circle cx="414" cy="28" r="3.5" fill="#28C840" />
<text x="430" y="33" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#FFFFFF">Note Studio</text>
<rect x="640" y="18" width="56" height="22" rx="11" fill="#2C2C2E" />
<text x="668" y="33" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#98989D">深色</text>
<line x1="384" y1="46" x2="696" y2="46" stroke="#48484A" />
<rect x="384" y="56" width="78" height="200" rx="8" fill="#2A2A2C" />
<rect x="394" y="80" width="58" height="8" rx="4" fill="#0A84FF" />
<rect x="394" y="98" width="58" height="8" rx="4" fill="rgba(235,235,245,0.24)" />
<rect x="394" y="116" width="58" height="8" rx="4" fill="rgba(235,235,245,0.24)" />
<rect x="394" y="134" width="58" height="8" rx="4" fill="rgba(235,235,245,0.24)" />
<rect x="472" y="56" width="168" height="200" rx="8" fill="#2C2C2E" stroke="#48484A" />
<rect x="488" y="76" width="110" height="9" rx="4" fill="rgba(255,255,255,0.85)" />
<rect x="488" y="98" width="136" height="7" rx="3.5" fill="rgba(235,235,245,0.3)" />
<rect x="488" y="114" width="136" height="7" rx="3.5" fill="rgba(235,235,245,0.3)" />
<rect x="488" y="130" width="96" height="7" rx="3.5" fill="rgba(235,235,245,0.3)" />
<rect x="486" y="146" width="140" height="24" rx="6" fill="#0A84FF" fill-opacity="0.22" stroke="#0A84FF" stroke-width="1.5" />
<text x="496" y="162" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="10" font-weight="600" fill="#4DA3FF">编辑中</text>
<rect x="488" y="184" width="136" height="7" rx="3.5" fill="rgba(235,235,245,0.3)" />
<rect x="488" y="200" width="80" height="7" rx="3.5" fill="rgba(235,235,245,0.3)" />
<rect x="650" y="56" width="46" height="200" rx="8" fill="#2A2A2C" />
<rect x="656" y="68" width="34" height="40" rx="6" fill="#3A3A3C" stroke="#48484A" />
<rect x="661" y="78" width="24" height="5" rx="2.5" fill="rgba(235,235,245,0.4)" />
<rect x="661" y="89" width="16" height="5" rx="2.5" fill="rgba(235,235,245,0.22)" />
<rect x="656" y="116" width="34" height="40" rx="6" fill="#3A3A3C" stroke="#48484A" />
<rect x="661" y="126" width="24" height="5" rx="2.5" fill="rgba(235,235,245,0.4)" />
<rect x="661" y="137" width="20" height="5" rx="2.5" fill="rgba(235,235,245,0.22)" />
<text x="540" y="270" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">侧边栏 #2A2A2C · 强调色 #0A84FF · 正文 #FFFFFF</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 4 · 明暗两套外观：结构完全一致，只替换色板，跟随系统切换</p>

<h2 id="技术栈">技术栈</h2>

<ul>
  <li><strong>前端</strong>：React 18 + Vite 6，不用 Tailwind，样式是手写的两份 CSS（设计令牌 + HIG 外观层）</li>
  <li><strong>文档</strong>：<code class="language-plaintext highlighter-rouge">pdfjs-dist</code>（渲染）、<code class="language-plaintext highlighter-rouge">pdf-lib</code>（写回）、<code class="language-plaintext highlighter-rouge">mammoth</code>（docx 读取）、<code class="language-plaintext highlighter-rouge">docx</code>、<code class="language-plaintext highlighter-rouge">xlsx</code>、<code class="language-plaintext highlighter-rouge">marked</code></li>
  <li><strong>文字识别</strong>：PaddleOCR.js + ONNX Runtime Web（PP-OCRv5_mobile / PP-OCRv6，本地推理）</li>
  <li><strong>语音识别</strong>：<code class="language-plaintext highlighter-rouge">vosk-browser</code>（Kaldi WASM 离线）+ Qwen3-ASR（<code class="language-plaintext highlighter-rouge">qwen-asr</code> + FastAPI 本地服务，OpenAI 兼容接口）</li>
  <li><strong>桌面 / 移动</strong>：Electron 36 + electron-builder（portable exe）、Capacitor 7（APK）</li>
  <li><strong>本地服务</strong>：Python，<code class="language-plaintext highlighter-rouge">server/convert_server.py</code> 做文档转换，<code class="language-plaintext highlighter-rouge">server/qwen3_asr_server.py</code> 做语音识别与模型下载管理</li>
</ul>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
</pre></td><td class="rouge-code"><pre>src/
  lib/pdf/          PDF 引擎：加载 / 渲染 / 视图 / 坐标 / 文字编辑 / 写回
  lib/FileProcessor.js   文件系统、解析、保存的唯一入口
  lib/momentumScroll.js  移动端单指滑动 + 松手惯性
  lib/useNewPageUndo.js  「新建一页」的后进先出记账
  components/       批注按钮、面板分隔条、设置、语音识别弹窗…
server/             Python 本地服务
</pre></td></tr></tbody></table></code></pre></div></div>

<h2 id="使用方式">使用方式</h2>

<h3 id="下载">下载</h3>

<div style="border:1px solid #E8E8E8;border-radius:12px;padding:24px;margin:24px 0;background:#FFFFFF;">
<div style="font-size:16px;font-weight:700;color:#262626;margin-bottom:4px;">Note Studio · 最新版下载</div>
<div style="font-size:13px;color:#8C8C8C;margin-bottom:16px;">单文件 · 免安装 · 约 251MB · Windows x64（另有 Android APK）</div>
<div style="margin-bottom:16px;">
<a href="https://github.com/SeanWang114514/note-studio/releases" style="display:inline-block;background:#1677FF;color:#FFFFFF;padding:10px 24px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;margin-right:12px;">前往 Releases 下载</a>
<a href="https://github.com/SeanWang114514/note-studio" style="display:inline-block;background:#FFFFFF;color:#595959;padding:9px 24px;border-radius:6px;text-decoration:none;font-size:14px;border:1px solid #D9D9D9;">查看项目源码</a>
</div>
<div style="font-size:12px;color:#8C8C8C;">下载 <code>Note-Studio-0.1.13-Windows.exe</code> 后双击即可运行，不会安装任何东西，也不会在注册表里留东西。</div>
</div>

<h3 id="快速上手">快速上手</h3>

<ol>
  <li>双击运行 exe，主页会列出最近打开过的文件；</li>
  <li>「打开文件」选一份 PDF，默认按适合宽度铺开；</li>
  <li>直接在文字上点一下就能改；要加批注就选画笔 / 文本框；</li>
  <li><code class="language-plaintext highlighter-rouge">Ctrl + S</code> 保存，改动写回原文件；</li>
  <li>需要识别手写或说话输入，点右上角的两个按钮。</li>
</ol>

<h3 id="使用场景">使用场景</h3>

<ul>
  <li>改 PDF 里的错别字、金额、日期，改完直接发给别人，不用再转格式</li>
  <li>在合同、论文、标书上做批注和圈画，批注跟着文件走</li>
  <li>把手写笔记、白板照片、截图里的文字提取出来，直接插进文档</li>
  <li>一边看资料一边口述笔记，语音直接落成文字</li>
  <li>手机上看 PDF、划重点（APK 版）</li>
</ul>

<h2 id="开源与致谢">开源与致谢</h2>

<p>这个项目站在一堆优秀的开源库肩膀上，特别感谢：</p>

<ul>
  <li><a href="https://github.com/mozilla/pdf.js">pdf.js</a> / <a href="https://github.com/Hopding/pdf-lib">pdf-lib</a> —— PDF 渲染与写回的地基</li>
  <li><a href="https://github.com/PaddlePaddle/PaddleOCR">PaddleOCR</a> 与 <a href="https://github.com/PaddlePaddle/PaddleOCR">PaddleOCR.js</a> —— 中英文与手写识别模型</li>
  <li><a href="https://onnxruntime.ai/">ONNX Runtime Web</a> —— 让模型能在浏览器里跑起来</li>
  <li><a href="https://alphacephei.com/vosk/">Vosk</a> / <a href="https://github.com/ccoreilly/vosk-browser">vosk-browser</a> —— 离线语音识别</li>
  <li><a href="https://github.com/QwenLM/Qwen3-ASR">Qwen3-ASR</a> —— 高精度语音识别</li>
  <li><a href="https://github.com/mwilliamson/mammoth.js">mammoth</a>、<a href="https://sheetjs.com/">SheetJS</a>、<a href="https://github.com/markedjs/marked">marked</a> —— 各格式的解析</li>
  <li><a href="https://www.electronjs.org/">Electron</a>、<a href="https://capacitorjs.com/">Capacitor</a>、<a href="https://vite.dev/">Vite</a>、<a href="https://react.dev/">React</a>、<a href="https://lucide.dev/">lucide</a> —— 打包与界面</li>
</ul>

<h2 id="写在最后">写在最后</h2>

<p>做这个工具的出发点很朴素：<strong>我不想为了改 PDF 里的两个字，先把文件传到别人的服务器上。</strong></p>

<p>本地优先这件事，在文档处理这个场景里不是洁癖，是刚需——你手上的文件可能是一份合同、一张成绩单、一页病历，或者只是还没来得及备份的草稿。让它们始终待在自己的硬盘上，同时又能享受”AI 帮我认字、帮我听写”的便利，这就是 Note Studio 想站的位置。</p>

<p>目前 Windows 版更新到 <strong>v0.1.13</strong>：工具栏图标放大了一档、按钮盒调到 32px，PDF 与各格式的「新建一页 / 删除新建页」都齐了，移动端手势也稳了。后面还会继续打磨 PDF 编辑的细节和格式支持。</p>

<p>如果你也有类似的需求，欢迎去 <a href="https://github.com/SeanWang114514/note-studio">GitHub</a> 下载体验，也欢迎提 issue 或 star 支持一下。</p>]]></content><author><name>Sean Wang</name></author><category term="工具" /><category term="PDF" /><category term="Electron" /><category term="React" /><category term="OCR" /><summary type="html"><![CDATA[一个基于 React + Electron 的本地文档工作台：PDF 能像 Word 一样逐字改，批注文本框自带格式栏，手写 OCR 与语音识别都在本机推理 —— 改完直接写回原文件。]]></summary></entry><entry><title type="html">PP-OCRv6 Desktop：一个纯 C++ 的离线 OCR + 翻译桌面工具</title><link href="https://seanwang114514.github.io/Personal-blog/2026/09/05/ppocrv6-desktop/" rel="alternate" type="text/html" title="PP-OCRv6 Desktop：一个纯 C++ 的离线 OCR + 翻译桌面工具" /><published>2026-09-05T23:00:00+00:00</published><updated>2026-09-05T23:00:00+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/2026/09/05/ppocrv6-desktop</id><content type="html" xml:base="https://seanwang114514.github.io/Personal-blog/2026/09/05/ppocrv6-desktop/"><![CDATA[<blockquote>
  <p>一个原生 Win32 C++ 应用，截图即识别、即翻译，无需联网，无需 Python，单文件直接运行。</p>
</blockquote>

<div style="border:1px solid #E8E8E8;border-left:4px solid #1677FF;border-radius:8px;padding:16px 20px;margin:24px 0;background:#F0F5FF;">
<div style="font-size:15px;font-weight:600;color:#262626;margin-bottom:4px;">快速下载</div>
<div style="font-size:13px;color:#595959;">在 <a href="https://github.com/SeanWang114514/PP-OCRv6-Desktop/releases" style="color:#1677FF;">GitHub Releases</a> 下载 <code>ChineseOCRLiteDesktop.exe</code>，单文件、免安装，双击即用（约 250MB）。项目源码：<a href="https://github.com/SeanWang114514/PP-OCRv6-Desktop" style="color:#1677FF;">PP-OCRv6-Desktop</a>。</div>
</div>

<!--more-->

<h2 id="为什么做这个">为什么做这个</h2>

<p>市面上的 OCR 工具大多依赖 Python 运行时，装一堆依赖才能跑起来；在线 API 又要联网、要注册、有调用限制。我只是想快速截图识别一段文字、翻译成英文，但每次都要打开浏览器或者等 Python 环境加载，体验并不流畅。</p>

<p>于是我做了一个 <strong>PP-OCRv6 Desktop</strong>：一个纯 C++ 编写的 Windows 桌面工具，截图 → OCR → 翻译，全程离线，双击即用。</p>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 320" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="PP-OCRv6 Desktop 三步流程：截图、识别、翻译">
<defs>
<marker id="f1-arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><polygon points="0 0, 8 4, 0 8" fill="#BFBFBF" /></marker>
</defs>
<rect x="1" y="1" width="718" height="318" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="32" y="38" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="20" font-weight="700" fill="#262626">PP-OCRv6 Desktop</text>
<text x="32" y="60" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#8C8C8C">离线 OCR + 中英翻译 · 纯 C++ · 单文件运行</text>
<rect x="556" y="24" width="132" height="30" rx="15" fill="#E6F4FF" />
<text x="622" y="44" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#1677FF">Windows · x64</text>
<line x1="32" y1="76" x2="688" y2="76" stroke="#F0F0F0" />
<!-- Step 1 -->
<rect x="32" y="96" width="202" height="156" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="52" y="124" font-family="system-ui, sans-serif" font-size="11" font-weight="600" fill="#8C8C8C">STEP 01</text>
<rect x="52" y="136" width="44" height="44" rx="8" fill="#E6F4FF" />
<rect x="62" y="147" width="24" height="18" rx="2" fill="none" stroke="#1677FF" stroke-width="1.5" stroke-dasharray="4 3" />
<line x1="74" y1="152" x2="74" y2="160" stroke="#1677FF" stroke-width="1.5" />
<line x1="70" y1="156" x2="78" y2="156" stroke="#1677FF" stroke-width="1.5" />
<text x="52" y="208" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">截图识别</text>
<text x="52" y="230" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">全局快捷键，框选即识别</text>
<!-- Step 2 -->
<rect x="259" y="96" width="202" height="156" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="279" y="124" font-family="system-ui, sans-serif" font-size="11" font-weight="600" fill="#8C8C8C">STEP 02</text>
<rect x="279" y="136" width="44" height="44" rx="8" fill="#E6F4FF" />
<rect x="288" y="147" width="26" height="5" rx="2.5" fill="#1677FF" />
<rect x="288" y="156" width="26" height="5" rx="2.5" fill="#1677FF" opacity="0.65" />
<rect x="288" y="165" width="16" height="5" rx="2.5" fill="#1677FF" opacity="0.35" />
<text x="279" y="208" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">OCR 识别</text>
<text x="279" y="230" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">PP-OCRv6 Tiny 本地推理</text>
<!-- Step 3 -->
<rect x="486" y="96" width="202" height="156" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="506" y="124" font-family="system-ui, sans-serif" font-size="11" font-weight="600" fill="#8C8C8C">STEP 03</text>
<rect x="506" y="136" width="44" height="44" rx="8" fill="#E6F4FF" />
<text x="513" y="165" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="15" font-weight="700" fill="#1677FF">中</text>
<line x1="532" y1="158" x2="542" y2="158" stroke="#1677FF" stroke-width="1.5" marker-end="url(#f1-arrow)" />
<text x="544" y="165" font-family="system-ui, sans-serif" font-size="14" font-weight="700" fill="#1677FF">En</text>
<text x="506" y="208" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">中英翻译</text>
<text x="506" y="230" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">本机互译，自动检测语言</text>
<line x1="238" y1="174" x2="255" y2="174" stroke="#BFBFBF" stroke-width="1.5" marker-end="url(#f1-arrow)" />
<line x1="465" y1="174" x2="482" y2="174" stroke="#BFBFBF" stroke-width="1.5" marker-end="url(#f1-arrow)" />
<text x="360" y="292" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">离线运行 · 单文件约 250MB · 无需 Python 环境</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 1 · 从截图到译文的三步流程，全程在本机完成</p>

<h2 id="功能一览">功能一览</h2>

<p>这个工具麻雀虽小，五脏俱全：</p>

<table>
  <thead>
    <tr>
      <th>功能</th>
      <th>说明</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>截图识别</td>
      <td>全局快捷键 <code class="language-plaintext highlighter-rouge">Ctrl + Alt + S</code> 一键截图，框选区域后自动异步 OCR</td>
    </tr>
    <tr>
      <td>中英翻译</td>
      <td>内置 MTranServer，支持中→英 / 英→中翻译，源语言自动检测</td>
    </tr>
    <tr>
      <td>Apple HIG 界面</td>
      <td>圆角卡片与分组布局，Light / Dark 双主题自动跟随系统</td>
    </tr>
    <tr>
      <td>托盘常驻</td>
      <td>关闭主窗口最小化到托盘，双击图标恢复</td>
    </tr>
    <tr>
      <td>自定义快捷键</td>
      <td>可自由修改截图快捷键</td>
    </tr>
    <tr>
      <td>开机自启动</td>
      <td>可选开机自启动 + 启动后隐藏到托盘</td>
    </tr>
    <tr>
      <td>快速清理</td>
      <td>识别结果支持一键删除空格 / 删除换行</td>
    </tr>
    <tr>
      <td>窗口记忆</td>
      <td>记住主窗口 / 设置窗口 / 结果窗口的大小与位置</td>
    </tr>
    <tr>
      <td>内存优化</td>
      <td>隐藏到托盘或空闲 60 秒自动释放工作集</td>
    </tr>
  </tbody>
</table>

<p>其中最值得一提的是界面设计。作为一个 Windows 工具，我参考 Apple Human Interface Guidelines 做了这套 UI：圆角卡片、分组背景、扁平化控件，整体干净利落。Light / Dark 双主题自动跟随系统切换，不需要手动设置。下图是同一窗口在两种主题下的对照——结构完全一致，只替换色板，这也是大厂规范里换肤的标准做法：</p>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 280" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="浅色与深色主题对照">
<!-- Light card -->
<rect x="8" y="8" width="344" height="264" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="36" cy="36" r="5" fill="#1677FF" />
<text x="48" y="41" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">PP-OCRv6 Desktop</text>
<rect x="284" y="24" width="48" height="22" rx="11" fill="#F5F5F5" />
<text x="308" y="39" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">Light</text>
<line x1="28" y1="56" x2="332" y2="56" stroke="#F0F0F0" />
<rect x="28" y="72" width="304" height="76" rx="8" fill="#FAFAFA" stroke="#F0F0F0" />
<circle cx="46" cy="92" r="4" fill="#52C41A" />
<text x="58" y="96" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#595959">识别完成 · 3 段文本</text>
<text x="44" y="120" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">离线 OCR + 中英翻译</text>
<text x="44" y="139" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">Hello World · 你好世界</text>
<rect x="28" y="164" width="148" height="36" rx="6" fill="#1677FF" />
<text x="102" y="187" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#FFFFFF">复制文本</text>
<rect x="184" y="164" width="148" height="36" rx="6" fill="#FFFFFF" stroke="#D9D9D9" />
<text x="258" y="187" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#595959">翻译</text>
<text x="180" y="228" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">跟随系统 · 浅色模式</text>
<text x="180" y="250" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#BFBFBF">文字 #262626 · 背景 #FFFFFF · 边框 #E8E8E8</text>
<!-- Dark card -->
<rect x="368" y="8" width="344" height="264" rx="12" fill="#1F1F1F" stroke="#303030" />
<circle cx="396" cy="36" r="5" fill="#1677FF" />
<text x="408" y="41" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#F0F0F0">PP-OCRv6 Desktop</text>
<rect x="644" y="24" width="48" height="22" rx="11" fill="#262626" />
<text x="668" y="39" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#A6A6A6">Dark</text>
<line x1="388" y1="56" x2="692" y2="56" stroke="#303030" />
<rect x="388" y="72" width="304" height="76" rx="8" fill="#262626" stroke="#434343" />
<circle cx="406" cy="92" r="4" fill="#52C41A" />
<text x="418" y="96" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#A6A6A6">识别完成 · 3 段文本</text>
<text x="404" y="120" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#F0F0F0">离线 OCR + 中英翻译</text>
<text x="404" y="139" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#A6A6A6">Hello World · 你好世界</text>
<rect x="388" y="164" width="148" height="36" rx="6" fill="#1677FF" />
<text x="462" y="187" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#FFFFFF">复制文本</text>
<rect x="544" y="164" width="148" height="36" rx="6" fill="#262626" stroke="#434343" />
<text x="618" y="187" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" fill="#F0F0F0">翻译</text>
<text x="540" y="228" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">跟随系统 · 深色模式</text>
<text x="540" y="250" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#595959">文字 #F0F0F0 · 背景 #1F1F1F · 边框 #303030</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 2 · 同一窗口的浅色 / 深色对照：结构一致，只替换色板</p>

<h2 id="技术架构">技术架构</h2>

<p>整个工具分为两个核心引擎：<strong>OCR 引擎</strong>和<strong>翻译引擎</strong>，它们通过简洁的架构协同工作。</p>

<div style="margin:24px 0 0;">
<svg style="width:100%;height:auto;display:block;" viewBox="0 0 720 400" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="技术架构：OCR 引擎与翻译引擎">
<defs>
<marker id="f3-arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><polygon points="0 0, 8 4, 0 8" fill="#8C8C8C" /></marker>
</defs>
<rect x="1" y="1" width="718" height="398" rx="12" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="32" y="38" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="15" font-weight="700" fill="#262626">技术架构 · 截图 → 识别 → 翻译</text>
<text x="688" y="38" text-anchor="end" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" fill="#8C8C8C">全程离线 · 本机处理</text>
<line x1="32" y1="54" x2="688" y2="54" stroke="#F0F0F0" />
<!-- Left panel header -->
<rect x="32" y="70" width="10" height="10" rx="2" fill="#1677FF" />
<text x="50" y="79" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">OCR 引擎</text>
<rect x="238" y="66" width="114" height="22" rx="11" fill="#F5F5F5" />
<text x="295" y="81" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">ncnn 本地推理</text>
<!-- Left rows -->
<rect x="32" y="100" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="60" cy="126" r="11" fill="#1677FF" />
<text x="60" y="130" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="#FFFFFF">1</text>
<text x="80" y="121" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">文字检测</text>
<text x="336" y="121" text-anchor="end" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">DBNet · det</text>
<text x="80" y="140" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">定位图片中的文字区域</text>
<line x1="60" y1="152" x2="60" y2="162" stroke="#D9D9D9" stroke-width="1.5" />
<rect x="32" y="162" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="60" cy="188" r="11" fill="#1677FF" />
<text x="60" y="192" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="#FFFFFF">2</text>
<text x="80" y="183" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">方向分类</text>
<text x="336" y="183" text-anchor="end" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">LCNet · cls</text>
<text x="80" y="202" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">判断文字方向是否需要旋转</text>
<line x1="60" y1="214" x2="60" y2="224" stroke="#D9D9D9" stroke-width="1.5" />
<rect x="32" y="224" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="60" cy="250" r="11" fill="#1677FF" />
<text x="60" y="254" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="#FFFFFF">3</text>
<text x="80" y="245" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">文字识别</text>
<text x="336" y="245" text-anchor="end" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">CRNN · rec</text>
<text x="80" y="264" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">将文字区域转换为文本字符串</text>
<!-- Right panel header -->
<rect x="368" y="70" width="10" height="10" rx="2" fill="#52C41A" />
<text x="386" y="79" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="14" font-weight="600" fill="#262626">翻译引擎</text>
<rect x="568" y="66" width="120" height="22" rx="11" fill="#F5F5F5" />
<text x="628" y="81" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">本机 HTTP 服务</text>
<!-- Right rows -->
<rect x="368" y="100" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="126" r="4" fill="#52C41A" />
<text x="410" y="121" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">MTranServer</text>
<text x="410" y="140" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">内嵌翻译服务，按需启动</text>
<rect x="368" y="162" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="188" r="4" fill="#52C41A" />
<text x="410" y="183" font-family="ui-monospace, Consolas, monospace" font-size="12" font-weight="600" fill="#262626">POST /translate · :8989</text>
<text x="410" y="202" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">本机回环调用，无需联网</text>
<rect x="368" y="224" width="320" height="52" rx="8" fill="#FFFFFF" stroke="#E8E8E8" />
<circle cx="396" cy="250" r="4" fill="#52C41A" />
<text x="410" y="245" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="13" font-weight="600" fill="#262626">中英互译</text>
<text x="410" y="264" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="11" fill="#8C8C8C">源语言自动检测</text>
<!-- Bottom flow bar -->
<rect x="32" y="292" width="656" height="52" rx="8" fill="#F5F5F5" />
<rect x="48" y="302" width="132" height="32" rx="16" fill="#FFFFFF" stroke="#E8E8E8" />
<text x="114" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#262626">识别文本</text>
<line x1="190" y1="318" x2="226" y2="318" stroke="#8C8C8C" stroke-width="1.5" marker-end="url(#f3-arrow)" />
<text x="360" y="323" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="11" fill="#8C8C8C">HTTP POST · localhost:8989</text>
<line x1="494" y1="318" x2="530" y2="318" stroke="#8C8C8C" stroke-width="1.5" marker-end="url(#f3-arrow)" />
<rect x="540" y="302" width="132" height="32" rx="16" fill="#F6FFED" stroke="#B7EB8F" />
<text x="606" y="323" text-anchor="middle" font-family="PingFang SC, Microsoft YaHei, system-ui, sans-serif" font-size="12" font-weight="600" fill="#389E0D">翻译结果</text>
<text x="360" y="372" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#8C8C8C">ncnn 20241226 · OpenCV 4.11 · Clipper2 · MTranServer</text>
</svg>
</div>
<p style="text-align:center;color:#8C8C8C;font-size:12px;margin:8px 0 24px;">图 3 · 双引擎架构：左为三段式 OCR 管线，右为本机翻译服务，底部为数据流向</p>

<h3 id="ocr-流程">OCR 流程</h3>

<p>OCR 引擎基于 PP-OCRv6 Tiny 模型，通过 ncnn 框架在 C++ 中直接推理，三步完成文字识别：</p>

<ol>
  <li><strong>文字检测</strong> — <code class="language-plaintext highlighter-rouge">PP_OCRv6_tiny_det</code>（DBNet）定位图片中的文字区域</li>
  <li><strong>方向分类</strong> — <code class="language-plaintext highlighter-rouge">PP_LCNet_x0_25_textline_ori</code> 判断文字是正向还是需要旋转</li>
  <li><strong>文字识别</strong> — <code class="language-plaintext highlighter-rouge">PP_OCRv6_tiny_rec</code>（CRNN）将文字区域转换为文本字符串</li>
</ol>

<h3 id="翻译流程">翻译流程</h3>

<p>识别完成后，文本通过 HTTP POST 发送到本机的 MTranServer（<code class="language-plaintext highlighter-rouge">localhost:8989/translate</code>），由翻译引擎完成中英互译。整个过程无需联网，所有数据都在本机处理。</p>

<h2 id="从源码构建">从源码构建</h2>

<h3 id="前置条件">前置条件</h3>

<ul>
  <li>Windows x64 系统</li>
  <li>Visual Studio 2022（需要 MSVC + CMake 支持）</li>
</ul>

<h3 id="一键构建">一键构建</h3>

<div class="language-bat highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre><span class="kd">build_native</span>.bat
</pre></td></tr></tbody></table></code></pre></div></div>

<p>构建脚本会自动完成以下步骤：</p>

<ol>
  <li>调用 VS2022 开发者命令行</li>
  <li>运行 CMake 配置（Release 模式）</li>
  <li>编译生成 <code class="language-plaintext highlighter-rouge">ChineseOCRLiteDesktop.exe</code></li>
</ol>

<p>CMake 构建后会自动将 <code class="language-plaintext highlighter-rouge">models/</code> 和 <code class="language-plaintext highlighter-rouge">ppocrv6_config.json</code> 复制到产物目录，无需手动操作。</p>

<h3 id="依赖说明">依赖说明</h3>

<p>好消息是，所有核心依赖都已经包含在仓库中：</p>

<ul>
  <li><strong>ncnn 20241226</strong> 和 <strong>OpenCV 4.11</strong> 静态库在 <code class="language-plaintext highlighter-rouge">third_party/</code> 目录</li>
  <li><strong>Clipper2</strong> 多边形裁剪库在 <code class="language-plaintext highlighter-rouge">ppocrv6_engine/3rdparty/clipper2/</code></li>
  <li>翻译资源（<code class="language-plaintext highlighter-rouge">mtranserver.exe</code>、模型、配置）已内置于发布版 exe</li>
</ul>

<p>你只需要一个 VS2022，就能从源码构建出完整的工具。</p>

<h2 id="自检功能">自检功能</h2>

<p>工具内置了自检命令，方便验证安装是否正常：</p>

<div class="language-bat highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre><span class="kd">ChineseOCRLiteDesktop</span><span class="err">.exe</span> <span class="na">--selftest
</span></pre></td></tr></tbody></table></code></pre></div></div>

<p>退出码含义：</p>

<table>
  <thead>
    <tr>
      <th>退出码</th>
      <th>含义</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0</code></td>
      <td>通过：OCR 模型加载 + 中英翻译均正常</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">3</code></td>
      <td>异常：OCR 模型文件缺失</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">4</code></td>
      <td>异常：OCR 引擎初始化失败</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">5</code></td>
      <td>异常：翻译引擎启动失败</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">6</code></td>
      <td>异常：翻译结果为空</td>
    </tr>
  </tbody>
</table>

<h2 id="使用方式">使用方式</h2>

<h3 id="下载">下载</h3>

<div style="border:1px solid #E8E8E8;border-radius:12px;padding:24px;margin:24px 0;background:#FFFFFF;">
<div style="font-size:16px;font-weight:700;color:#262626;margin-bottom:4px;">PP-OCRv6 Desktop · 最新版下载</div>
<div style="font-size:13px;color:#8C8C8C;margin-bottom:16px;">单文件 · 免安装 · 约 250MB · Windows x64</div>
<div style="margin-bottom:16px;">
<a href="https://github.com/SeanWang114514/PP-OCRv6-Desktop/releases" style="display:inline-block;background:#1677FF;color:#FFFFFF;padding:10px 24px;border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;margin-right:12px;">前往 Releases 下载</a>
<a href="https://github.com/SeanWang114514/PP-OCRv6-Desktop" style="display:inline-block;background:#FFFFFF;color:#595959;padding:9px 24px;border-radius:6px;text-decoration:none;font-size:14px;border:1px solid #D9D9D9;">查看项目源码</a>
</div>
<div style="font-size:12px;color:#8C8C8C;">下载 <code>ChineseOCRLiteDesktop.exe</code> 后双击即可运行，源码遵循上游项目的开源协议，模型遵循 PaddlePaddle 许可条款。</div>
</div>

<h3 id="快速上手">快速上手</h3>

<ol>
  <li>双击运行 <code class="language-plaintext highlighter-rouge">ChineseOCRLiteDesktop.exe</code></li>
  <li>按 <code class="language-plaintext highlighter-rouge">Ctrl + Alt + S</code> 截图（可在设置中修改快捷键）</li>
  <li>框选需要识别的区域</li>
  <li>等待 OCR 识别完成</li>
  <li>查看结果，支持一键翻译</li>
</ol>

<h3 id="使用场景">使用场景</h3>

<ul>
  <li>阅读外文文档时快速翻译</li>
  <li>从图片中提取文字，告别手打</li>
  <li>查看论文截图中的公式和数据</li>
  <li>翻译软件界面、菜单、报错信息</li>
  <li>快速记录白板、PPT 上的内容</li>
</ul>

<h2 id="项目结构">项目结构</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="rouge-code"><pre>PP-OCRv6-Desktop/
├── src/                          # 主程序源码
│   └── main.cpp                  # Win32 GUI + OCR + 翻译 + 托盘
├── ppocrv6_engine/               # PP-OCRv6 ncnn C++ 推理引擎
│   ├── ocr_engine.cpp/h          # OCR 引擎入口
│   ├── db_net.cpp/h              # 文字检测网络
│   ├── angle_net.cpp/h           # 方向分类网络
│   ├── crnn_net.cpp/h            # 文字识别网络
│   └── 3rdparty/                 # Clipper2 + plog
├── models/                       # OCR 模型文件
├── third_party/                  # 预编译静态库 (ncnn, OpenCV)
├── CMakeLists.txt                # CMake 构建配置
└── build_native.bat              # 一键构建脚本
</pre></td></tr></tbody></table></code></pre></div></div>

<h2 id="开源与致谢">开源与致谢</h2>

<p>本项目站在这些优秀开源项目的肩膀上：</p>

<ul>
  <li><a href="https://github.com/PaddlePaddle/PaddleOCR">PaddleOCR</a> — PP-OCR 系列模型</li>
  <li><a href="https://github.com/Tencent/ncnn">Tencent/ncnn</a> — 高性能神经网络推理框架</li>
  <li><a href="https://github.com/Avafly/PaddleOCR-ncnn-CPP">Avafly/PaddleOCR-ncnn-CPP</a> — PP-OCRv6 ncnn C++ 推理集成参考</li>
  <li><a href="https://opencv.org/">OpenCV</a> — 计算机视觉库</li>
  <li><a href="http://www.angusj.com/clipper2/">Clipper2</a> — 多边形裁剪库</li>
</ul>

<h2 id="写在最后">写在最后</h2>

<p>做这个工具的初衷很简单：我想要一个<strong>打开就能用</strong>的 OCR + 翻译工具。不需要装 Python，不需要配置环境，不需要联网，不需要注册账号。双击 exe，截图，识别，翻译，完成。</p>

<p>如果你也有类似的需求，欢迎去 <a href="https://github.com/SeanWang114514/PP-OCRv6-Desktop">GitHub</a> 下载体验，也欢迎提 issue 或 star 支持一下。</p>]]></content><author><name>Sean Wang</name></author><category term="AI" /><category term="工具" /><category term="C++" /><category term="OCR" /><category term="PaddleOCR" /><summary type="html"><![CDATA[一个原生 Win32 C++ 应用，截图即识别、即翻译，无需联网，无需 Python，单文件直接运行。]]></summary></entry><entry><title type="html">DeepSeek 海报展：52 种风格自我介绍</title><link href="https://seanwang114514.github.io/Personal-blog/2026/08/13/deepseek-poster-52/" rel="alternate" type="text/html" title="DeepSeek 海报展：52 种风格自我介绍" /><published>2026-08-13T20:00:00+00:00</published><updated>2026-08-13T20:00:00+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/2026/08/13/deepseek-poster-52</id><content type="html" xml:base="https://seanwang114514.github.io/Personal-blog/2026/08/13/deepseek-poster-52/"><![CDATA[<p>当自我介绍只有一段文字时，它只能说明”我是谁”；但当这段文字被 52 种视觉语言重新演绎，它就变成了一场小型设计展览。这个项目用一张网页，把同一个 <code class="language-plaintext highlighter-rouge">PROFILE</code> 数据同时装进瑞士国际主义、包豪斯、赛博朋克、日式和风、蒸汽波、像素艺术等 52 种风格里。</p>

<p>在线体验：<a href="https://seanwang114514.github.io/deepseek-poster-52/">DeepSeek 海报展 · 52 种风格自我介绍</a></p>

<h2 id="为什么做这个">为什么做这个</h2>

<p>自我介绍通常很无聊：名字、头衔、一两句话，最后加上联系方式。它在简历里、在社交主页里、在会议开场白里反复出现，却很少有人把它当成一个值得认真设计的对象。</p>

<p>于是我把”我是谁”拆成一组可以被任意风格渲染的数据，再为它配上 52 套完全不同的版式、字体、色彩和装饰语言。观看者可以从 52 个角度重新认识这个对象，而不是只看到一句话。</p>

<h2 id="数据与样式分离">数据与样式分离</h2>

<p>整个页面只依赖一个简单的设计：内容放在 <code class="language-plaintext highlighter-rouge">PROFILE</code> 里，风格放在 <code class="language-plaintext highlighter-rouge">POSTERS</code> 里。</p>

<p><code class="language-plaintext highlighter-rouge">PROFILE</code> 保存名字、头衔、简介、标签和联系方式，是唯一需要编辑的内容源；<code class="language-plaintext highlighter-rouge">POSTERS</code> 保存每张海报的编号、风格名称和装饰元素。想换人设，只需要改 <code class="language-plaintext highlighter-rouge">PROFILE</code>；想新增风格，只需要在 <code class="language-plaintext highlighter-rouge">POSTERS</code> 里加一项，再补一套对应 CSS。</p>

<p>这种结构的最大好处是修改成本极低，内容与视觉互不干扰，适合快速做个人主页、品牌展示或设计灵感实验。</p>

<h2 id="52-种风格从哪来">52 种风格从哪来</h2>

<p>风格清单覆盖了现代设计史里几个重要的流派：瑞士国际主义的网格理性、包豪斯的几何构成、装饰艺术的华丽线条、极简主义的克制留白、孟菲斯的活泼配色，也有更年轻的赛博朋克、蒸汽波、酸性设计、Y2K 千禧和玻璃拟态。</p>

<p>除了平面设计流派，页面还加入了像素、折纸、水墨、报纸、拼贴、HUD、代码矩阵等更有趣味性的方向。每一张海报不只是换一个背景色，而是用不同的版式结构和专属装饰元素重新组织信息，所以连续翻看 52 张也不会觉得只是换皮。</p>

<h2 id="轻量交互">轻量交互</h2>

<p>海报墙本身用响应式网格铺开，鼠标移上去有轻微的浮起效果。点击任意海报会进入灯箱模式，海报居中放大，背景变暗，适合仔细查看版式细节。</p>

<p>灯箱里支持方向键左右切换、Esc 关闭，也支持点击空白处退出。整套交互只用原生 JavaScript 实现，没有引入任何框架或依赖，因此文件可以离线打开，也能直接丢到任何静态托管服务上。</p>

<h2 id="把它变成自己的">把它变成自己的</h2>

<p>项目里默认的 <code class="language-plaintext highlighter-rouge">PROFILE</code> 是 DeepSeek 的演示信息，用来展示这套模板的效果。实际使用时，搜索 <code class="language-plaintext highlighter-rouge">PROFILE</code>，把名字、头衔、简介、标签和联系方式替换成自己的内容，52 张海报会同步更新，不需要改任何样式代码。</p>

<p>海报墙天然适合做：</p>

<ul>
  <li>个人简历主页</li>
  <li>AI 产品介绍页</li>
  <li>作品集和设计灵感板</li>
  <li>活动宣传的多风格物料</li>
</ul>

<h2 id="单文件也是一种选择">单文件也是一种选择</h2>

<p>在工程化工具链越来越复杂的今天，一个没有构建步骤、没有依赖、双击就能打开的单文件页面反而显得难得。它适合作为一个小而完整的实验品：源码可读、内容可改、部署无痛。</p>

<p>代码托管在 <a href="https://github.com/SeanWang114514/deepseek-poster-52">SeanWang114514/deepseek-poster-52</a>，欢迎体验 <a href="https://seanwang114514.github.io/deepseek-poster-52/">DeepSeek 海报展</a>，也欢迎到仓库提 issue 或点个 star。</p>]]></content><author><name>Sean Wang</name></author><category term="AI" /><category term="设计" /><category term="工具" /><summary type="html"><![CDATA[当自我介绍只有一段文字时，它只能说明”我是谁”；但当这段文字被 52 种视觉语言重新演绎，它就变成了一场小型设计展览。这个项目用一张网页，把同一个 PROFILE 数据同时装进瑞士国际主义、包豪斯、赛博朋克、日式和风、蒸汽波、像素艺术等 52 种风格里。]]></summary></entry><entry><title type="html">Geekbench 性价比天梯图：一张图看懂 CPU / GPU 跑分与价格</title><link href="https://seanwang114514.github.io/Personal-blog/2026/08/02/geekbench-value-ladder/" rel="alternate" type="text/html" title="Geekbench 性价比天梯图：一张图看懂 CPU / GPU 跑分与价格" /><published>2026-08-02T15:00:00+00:00</published><updated>2026-08-02T15:00:00+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/2026/08/02/geekbench-value-ladder</id><content type="html" xml:base="https://seanwang114514.github.io/Personal-blog/2026/08/02/geekbench-value-ladder/"><![CDATA[<p>装机、升级或者纠结要不要换显卡的时候，跑分和价格永远是最核心的两个问题：性能强不强，值不值这个价。于是我做了一个 <a href="https://github.com/SeanWang114514/geekbench-value-ladder">geekbench-value-ladder</a> 项目：一个单文件网页，把 GPU / CPU 的 Geekbench 跑分和人民币价格放在同一张天梯图里，直接看性能和性价比。</p>

<p>在线体验：<a href="https://seanwang114514.github.io/geekbench-value-ladder/">Geekbench 性价比天梯图</a></p>

<h2 id="它能做什么">它能做什么</h2>

<ul>
  <li>显卡 / CPU 一键切换，性能榜 / 性价比榜两种视图切换</li>
  <li>按品牌筛选：NVIDIA、AMD、Intel、Apple，各有对应颜色标识</li>
  <li>支持搜索型号（比如 <code class="language-plaintext highlighter-rouge">RTX 5080</code>、<code class="language-plaintext highlighter-rouge">7800X3D</code>）和加载更多</li>
  <li>性价比 = Geekbench 跑分 ÷ 价格（元），榜单会直接给出每分钱能买到多少性能</li>
  <li>价格标签标注来源（ZOL 电商价 / 参考价、苏宁估价等），点击即可跳转到对应详情页或电商搜索页</li>
</ul>

<h2 id="数据从哪来">数据从哪来</h2>

<ul>
  <li>Geekbench 跑分：<a href="https://cpuranklist.com/">cpuranklist</a> 的 GPU / CPU 榜单</li>
  <li>人民币价格：中关村在线 ZOL 的显卡 / CPU 报价，电商估价用苏宁易购搜索兜底</li>
  <li>同一型号多个价格时取最低价，价格来源可以追溯到具体页面</li>
</ul>

<p>页面默认使用内置的数据快照，纯静态模式直接打开 <code class="language-plaintext highlighter-rouge">index.html</code> 就能看。</p>

<h2 id="本地自动更新价格">本地自动更新价格</h2>

<p>GitHub Pages 是纯静态托管，只能展示最后一次内嵌的数据快照。想要每天自动更新价格，可以本地跑：</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre>node server.mjs
</pre></td></tr></tbody></table></code></pre></div></div>

<p>然后访问 <code class="language-plaintext highlighter-rouge">http://127.0.0.1:8765</code>。服务会每天抓取一次当日价格；在设置里隐藏参考价后，还会自动为只有参考价的型号抓取电商估价，抓取失败的型号会从性价比榜移除，并显示成功 / 失败数量。</p>

<p>如果更新了 <code class="language-plaintext highlighter-rouge">data.json</code>，还可以用 <code class="language-plaintext highlighter-rouge">node build.mjs</code> 把它重新内嵌进 <code class="language-plaintext highlighter-rouge">index.html</code>，生成新的静态页面。</p>

<h2 id="技术细节">技术细节</h2>

<ul>
  <li>最终交付物是单文件 <code class="language-plaintext highlighter-rouge">index.html</code>，不依赖任何框架和后端</li>
  <li><code class="language-plaintext highlighter-rouge">scrape.mjs</code> 负责抓取跑分、价格和电商估价，并做型号匹配</li>
  <li><code class="language-plaintext highlighter-rouge">server.mjs</code> 提供每日价格更新、电商估价和手动刷新跑分接口</li>
  <li><code class="language-plaintext highlighter-rouge">index.template.html</code> + <code class="language-plaintext highlighter-rouge">build.mjs</code> 负责生成最终页面</li>
</ul>

<h2 id="适合谁用">适合谁用</h2>

<p>无论是想查某张显卡值不值，还是想快速比较一堆 CPU 的性价比，这个页面都能省掉来回查榜单和报价的时间。欢迎体验，也欢迎到仓库提 issue 或点个 star。</p>]]></content><author><name>Sean Wang</name></author><category term="Geekbench" /><category term="GPU" /><category term="CPU" /><category term="硬件" /><summary type="html"><![CDATA[装机、升级或者纠结要不要换显卡的时候，跑分和价格永远是最核心的两个问题：性能强不强，值不值这个价。于是我做了一个 geekbench-value-ladder 项目：一个单文件网页，把 GPU / CPU 的 Geekbench 跑分和人民币价格放在同一张天梯图里，直接看性能和性价比。]]></summary></entry><entry><title type="html">GitHub 高星新项目：用 AI 帮你发现新晋热门仓库</title><link href="https://seanwang114514.github.io/Personal-blog/2026/08/02/github-hot-repos/" rel="alternate" type="text/html" title="GitHub 高星新项目：用 AI 帮你发现新晋热门仓库" /><published>2026-08-02T12:00:00+00:00</published><updated>2026-08-02T12:00:00+00:00</updated><id>https://seanwang114514.github.io/Personal-blog/2026/08/02/github-hot-repos</id><content type="html" xml:base="https://seanwang114514.github.io/Personal-blog/2026/08/02/github-hot-repos/"><![CDATA[<p>GitHub Trending 是很多人每天必刷的页面，但它更偏向“老牌项目”，新仓库想冒头并不容易。于是我做了 <a href="https://github.com/SeanWang114514/github-hot-repos">github-hot-repos</a> 这个小项目：一个纯静态的“GitHub 高星新项目”速览站点，专门抓取最近 7 / 30 / 90 天创建、按 Stars 排序的新仓库。</p>

<p>在线体验：<a href="https://seanwang114514.github.io/github-hot-repos/">GitHub 高星新项目</a></p>

<h2 id="它能做什么">它能做什么</h2>

<ul>
  <li>数据来自 GitHub Search API，抓取近 7 / 30 / 90 天创建的高星项目，默认按 Stars 倒序</li>
  <li>按项目类型自动分类，每个分类默认展示 3 个项目，可以一键展开全部</li>
  <li>顶部有统计概览，支持周期切换、刷新和加载更多</li>
  <li>每张项目卡片包含仓库名、owner、简介、语言、Star 数和创建时间</li>
</ul>

<h2 id="ai-翻译与总结">AI 翻译与总结</h2>

<p>这个项目最有意思的地方是 AI 能力：</p>

<ul>
  <li>通过本地 Ollama 或 OpenAI 兼容接口，自动为英文项目生成中文总结与翻译简介</li>
  <li>内置了一批常见项目的翻译缓存，接口不可用时也有兜底</li>
  <li>模型地址、模型名和 API Key 都可以在页面右上角设置，配置只保存在浏览器 localStorage，不会写入任何文件</li>
</ul>

<p>AI 翻译默认连接本地 Ollama（<code class="language-plaintext highlighter-rouge">http://localhost:11434</code>），本地服务不可用时自动回退直连 Ollama；如果远程 API 在浏览器中受 CORS 限制，还可以用 <code class="language-plaintext highlighter-rouge">node server.js</code> 起一个本地代理。</p>

<h2 id="技术细节">技术细节</h2>

<ul>
  <li>纯 HTML / CSS / JavaScript 单页应用，无需后端，直接打开 <code class="language-plaintext highlighter-rouge">index.html</code> 就能用</li>
  <li>数据全部来自 GitHub 公开 API</li>
  <li>已部署到 GitHub Pages，代码托管在 <a href="https://github.com/SeanWang114514/github-hot-repos">SeanWang114514/github-hot-repos</a></li>
</ul>

<p>README 里还写着这个站点 100% 由 DeepSeekv4Flash 编写，算是 AI 辅助开发的一次小实践。</p>

<h2 id="为什么值得试试">为什么值得试试</h2>

<p>每天想看看 GitHub 上有什么新东西时，与其在 Trending 上翻来翻去，不如直接看“新仓库里谁涨 Star 最快”。这个工具把“新增 + 高星 + 分类 + 中文简介”组合在一起，几分钟就能扫完最近一周值得关注的开源项目。</p>

<p>欢迎体验：<a href="https://seanwang114514.github.io/github-hot-repos/">GitHub 高星新项目</a>，也欢迎到仓库提 issue 或点个 star。</p>]]></content><author><name>Sean Wang</name></author><category term="GitHub" /><category term="AI" /><category term="工具" /><summary type="html"><![CDATA[GitHub Trending 是很多人每天必刷的页面，但它更偏向“老牌项目”，新仓库想冒头并不容易。于是我做了 github-hot-repos 这个小项目：一个纯静态的“GitHub 高星新项目”速览站点，专门抓取最近 7 / 30 / 90 天创建、按 Stars 排序的新仓库。]]></summary></entry></feed>