aloneatwar51 downloads逐句朗读笔记:点击句子从该句开始连读,多 TTS 供应商账号,预取 + 哈希缓存无缝衔接,桌面与移动端可用。Read notes aloud sentence by sentence with multi-provider TTS, prefetching and hash-based caching.
逐句朗读 Obsidian 笔记的 TTS 插件:点击正文任意句子,从该句开始整篇连读,当前句高亮跟随,预取 + 哈希缓存实现无缝衔接。桌面与移动端(锁屏续播)可用。
POST /v1/audio/speech,支持自托管服务)/v1/audio/speech + /api/voices 音色发现 + /health 健康检查 + 语言参数)main.js、manifest.json、styles.css.obsidian/plugins/voice-aloud/ 目录添加本仓库地址到 BRAT 即可安装并跟踪测试版。
Voice Aloud is a text-to-speech plugin that reads your notes aloud sentence by sentence. Click any sentence in reading view to start continuous playback from that point, with the current sentence highlighted as it reads. Playback is gapless thanks to prefetching and a per-sentence hash cache.
Install: download main.js, manifest.json and styles.css from Releases into .obsidian/plugins/voice-aloud/, or add this repository to BRAT.
npm install
npm run dev # watch 模式构建
npm run build # 生产构建(minify)
npm run lint # ESLint
npm run typecheck # TypeScript 严格类型检查
npm test # Vitest 单元测试
src/
├── main.ts # 插件入口:命令、事件接线、队列持久化
├── i18n/ # 文案集中管理(中文,预留多语言)
├── core/
│ ├── sentences.ts # 断句 + 句子身份(hash),TTS 与正文标注共用
│ ├── annotation.ts # 阅读视图句子 span 标注 + 播放高亮
│ ├── point-read.ts # 点读模式状态机
│ ├── player.ts # 播放状态机(预取、回退 N 秒)
│ ├── synth-service.ts # 共享合成服务(缓存查询/合成/落缓存 + in-flight 去重)
│ ├── pregen-queue.ts # 预生成队列(任务状态机 + 句子级并发调度 + 持久化)
│ ├── mediasession.ts # 系统媒体键 / 锁屏控制
│ ├── accounts.ts # 账号模型与当前账号解析
│ ├── providers/ # TTS 供应商适配器(统一接口 + 注册表)
│ └── cache/ # IndexedDB 音频缓存 + 笔记反向索引
├── ui/ # Player 面板、预生成队列视图、设置页、账号编辑弹窗
└── util/ # 哈希等工具