perf: 加速语音转写缓存命中

迁移旧版语音转写缓存,并将补迁失败降级为一次性失败状态。

按账号和消息标识优先命中兼容缓存,未命中时才读取音频并计算哈希;导出缓存命中后合并异步刷新知识索引。

补充迁移、缓存快速路径、批量语音读取和导出流程测试。
This commit is contained in:
Nanin
2026-08-12 20:01:40 +08:00
parent a80624d6ab
commit 34b86af0be
15 changed files with 1026 additions and 165 deletions
@@ -10,6 +10,7 @@ export interface PcmProcessorOptions {
}
export class PcmAudioProcessor implements AudioProcessor {
readonly version = VOICE_PROCESSOR_VERSION
private readonly targetSampleRate: number
private readonly silenceThreshold: number
private readonly silencePaddingMs: number