← 返回全部案例

CASE STUDY

2026.10.28 · v2 与书写示范 · 个人项目 · AI 协作

整理于约 5 分钟

声音手帖:重建练习之前,先保护已经学过的记录

旧版声音手帖可以听音、看假名,也能标记“认识”。重建时,我想要能持续练习的流程:先认识、遮住提示、作答、评价记忆,再安排下次复习。

我提供学习目标和旧数据必须保留的要求,AI 编程工具检索开源方案、核对许可并实现。我们保留站点框架和原有条目,只替换需要重建的学习流程。

“认识”不能直接变成一段复习历史

旧版的自标记没有记录每次复习的时间与记忆评价。若把它转换成已经熟练的 FSRS 卡片,就等于补造学习证据。

迁移因此先备份旧记录,再写入并读验新状态;旧标记保留为 legacyKnown,不生成过去的复习。已有新版状态时不重复迁移。平假名与片假名分别调度,答对与记忆评分也分别记录。

这项选择会让部分老用户重新评价卡片,却保留了数据含义。导入同样先校验、备份当前状态,再替换;失败时不能让读者失去原记录。

找到开源库后,还要核对实际部署环境

我们使用 ts-fsrs,而没有自己写一个间隔算法。研究时也发现,新版库的 Node 要求与实际发布副本不同,因此固定兼容的版本,通过 Adapter 隔离调用。

离线方案也遇到兼容范围问题:候选 Astro PWA 插件声明的版本范围没有覆盖本站版本。最终用 Workbox 在构建后生成只服务声音手帖的 worker,让读者明确点击准备离线内容。

代码许可、假名数据和音频来源分别登记。能复用一个库,不代表能够连同另一个项目的录音或素材一起搬走。

音频没播出来,这一题就还没成立

听音辨认依赖播放成功。浏览器拒绝播放时,不能继续让人回答一题没有听到的题。播放器因此统一管理实例,切换时停止旧音频,播放失败时阻止对应作答并说明原因。

新的日语重合成曾受接口错误阻塞,已有 AI 音频暂时保留。接口连通、文件存在、读音正确与真实设备可播放,需要各自的检查。

笔顺示范不应悄悄改动复习进度

后续加入 KanjiVG 数据与 Vivus 动画时,示范弹窗可以暂停、重播和切换字形,但这些动作不改变学习评分。关闭弹窗或切换字形后要停止旧动画;偏好减少动态效果的读者仍可逐笔查看静态结果。来源与许可文件也随离线包提供。

历史记录覆盖迁移、存储失败、离线、笔画时间线和浏览器交互。本轮只核对源码与这些记录,未重跑学习实验。专业读音与字形审校、真实手机和长期学习效果仍缺证据。声音手帖能提供练习工具,是否帮助记住假名,还需要真实使用来判断。

Sound Notebook: rebuilding practice without inventing learning history

The earlier Sound Notebook played audio, displayed kana, and let me mark items as known. For v2 I wanted a repeatable sequence: introduction, hidden cues, an answer, a memory rating, and another review.

I set the learning goal and required preservation of old data. AI coding tools researched libraries, checked licenses, and implemented the changes within the existing site.

Preserve what an old mark actually means

A self-marked item has no dated review history or memory rating. Turning it into a mature FSRS card would invent evidence.

Migration backs up the old record, writes and reads back the new state, and retains old marks as legacyKnown. It creates no past reviews and does not repeat migration over existing v2 data. Hiragana and katakana have independent cards; answer correctness and memory ratings stay distinct.

Imports also validate and back up before replacing current state. This adds work for returning learners but preserves the meaning of their records.

Check compatibility beyond the library name

We used ts-fsrs instead of creating a scheduling algorithm. The latest library’s Node requirement conflicted with the deployment copy, so we pinned a compatible release behind an adapter.

A candidate Astro PWA plugin did not declare compatibility with the site’s Astro version. Workbox instead generates a worker after the build, scoped to Sound Notebook. Learners explicitly prepare offline content. Code, kana data, and audio rights were checked separately.

A listening question requires successful playback

If the browser rejects playback, the learner has not heard the question. A shared player stops earlier audio on a switch and prevents the corresponding answer step after failure.

New Japanese synthesis also encountered API errors. Existing AI audio remained, with pronunciation review still open. A valid response, an existing file, correct pronunciation, and playback on a real device are separate claims.

Stroke demonstrations leave review state alone

The later KanjiVG and Vivus feature adds pause, replay, and script switching without changing review ratings. Closing or redrawing stops the earlier animation. Reduced-motion users can inspect static strokes, and attribution travels with the offline content.

This article checks source and historical migration, storage, offline, and browser records. It reruns no learning study. Professional pronunciation and glyph review, real phones, and long-term retention remain unverified. Sound Notebook provides a practice workflow whose learning value still needs observation.