Repository navigation
feat: 本机录音缓存与重新识别,可更改本机模型的保存位置 - #194
Merged
Merged
Conversation
- 电脑端在本机保留最近的录音(条数和占用空间可设置,可清理);识别或润色失败后可以重新识别,不必再说一遍。长录音按段写成 Opus,应用异常退出后下次启动可以找回。 - 重新识别时可以临时换用其他语音模型和 AI 模型;首页显示未识别的录音。 - 历史记录默认每页 10 条,列表和详情占满窗口高度;额度池的「添加」与服务商、模型在同一行,每项都有「移除」。 - 本机模型可以更改保存位置,已下载的模型会一起移过去(#192)。
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #194 +/- ##
==========================================
- Coverage 93.84% 93.65% -0.19%
==========================================
Files 390 403 +13
Lines 56009 59272 +3263
Branches 3765 3922 +157
==========================================
+ Hits 52559 55514 +2955
- Misses 2947 3217 +270
- Partials 503 541 +38
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
这一个 PR 合并为补丁版本 0.1.9(用户 2026-10-26 要求),并关闭 #192。
crates/voltip-core/src/audio_cache.rs、dictation/archive.rs、ogg.rs、runtime/audio.rs):电脑端默认在本机保留最近 20 条、最多 200 MB 的录音(设置 › 隐私与历史 › 录音缓存,可关闭、调整和清理;只存在这台电脑上,不同步到手机,也不进备份)。2 分钟以内的录音保存为 WAV;更长的录音在录制时每 30 秒写一段 Ogg Opus(每段单独编码,写入临时文件、同步到磁盘后再改名)并记在manifest.json里,Voltip 意外退出后,下次启动会找回已录下的部分,标记为「录制或处理时 Voltip 已关闭」。在历史记录里可以「重新识别」或「重新润色」,重新识别的结果作为新记录保存并复制到剪贴板。audio_retake可以带上这一次使用的语音模型和 AI 润色,不修改设置;首页「最近的结果」上方列出未识别的录音(最多 3 条,可一键清理)。<id>.moving并检查,全部完成后写入models-location.json并切换,再删除旧文件。移动可以取消,取消或失败时全部撤销;暂时删不掉的旧文件夹在下次启动时删除。移动期间不能下载、导入或删除模型,下载期间不能移动。在不区分大小写的文件系统上,用带标记的探测文件识别同一个文件夹的不同写法,避免把模型当成旧副本删除(回归测试)。桌面应用、命令行和本机语音服务读同一个位置;手机端的同名命令直接拒绝。history-fix-*、local-*截图。验证
make verify(toolchain 1.98.0)在这个提交上全部通过:Rust 行覆盖率 92.97%(门槛 90%),clippy、cargo-deny、IPC e2e、web lint/typecheck/coverage/build、验收台账、主机名扫描、发布脚本与自建网关测试。tests/audio_cache.rs、dictation/archive.rs的 9 个单元测试、tests/long.rs中 2 小时录音保存为 240 段、取消不超过 2 分钟的录音不保留)、重新识别换模型(core +RetakeModels.test.ts、Recordings.test.tsx)、模型移动(voltip-asr-local/tests/relocate.rs9 个、voltip-core/tests/models.rs5 个、ModelsLocation.test.tsx4 个)、IPC 契约样例重新生成。kill -9,下次启动找回 67.7 s 的录音并标记为中断。桌面 smoke 新增检查:粘贴的那次听写的录音已保留,并对应到它的历史记录。cargo test -p voltip-asr-local -p voltip-core全部通过(包括 NTFS 上的大小写回归测试);用户在这台电脑上用测试构建验收了全部改动。未验证
Closes #192