助手本体:会话引擎、LLM 路由、记忆、身份、语音适配
从 Obsidian 笔记库剥离为独立仓库。规划文档与 P0 报告留在笔记库, 代码(助手本体、TTS 服务、P0 基准脚本、ESP32 固件)在此。 架构:服务器是助手,本地是客户端 - 助手本体跑在 cadadmin-server,N5095 只做 USB 外设桥与网络桥接 - 起因:实测 N5095 无 AVX2,跑不动可用的语音模型 当前技术栈 - LLM:DeepSeek deepseek-flash(云端,必须关思考) - TTS:Qwen3-TTS 1.7B(服务器 3090,独立 HTTP 服务) - STT:Zipformer 中英双语 int8(CPU,中文识别率未测) 实测:端到端 16/16 通过,首音延迟 1545ms (对比:本地 LLM + vits-zh-ll 是 179ms,但音色不满意——音质与延迟 在此硬件上此消彼长) 设计要点 - MemoryStore 接口按"可能远程"设计(全 async、可超时、可失败) - user_id / session_id / track_id 三者分开,人脸只作候选不自动切身份 - 记忆查询强制带 owner_user_id,无按 id 单独取的口子 - 自动抽取的记忆是"候选",默认不参与检索 - 异步写记忆绑定创建时的身份,不读"当前用户" - 引擎与传输解耦,只用文件音频即可端到端测试 模型与音频产物不进版本管理(1.1GB),由 download_models.sh 恢复
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
{
|
||||
"chunk_ms": 100,
|
||||
"results": {
|
||||
"1": {
|
||||
"rows": {
|
||||
"stt_0.wav": {
|
||||
"audio_s": 10.053125,
|
||||
"total_s": 4.046593594999649,
|
||||
"rtf": 0.36610402895105676,
|
||||
"rtf_speech_only": 0.4025209668635026,
|
||||
"chunk_ratio_p50": 0.003555890002644446,
|
||||
"chunk_ratio_p95": 1.1945098499973028,
|
||||
"chunk_ratio_max": 1.2445684299973436,
|
||||
"first_partial_audio_s": 1.1,
|
||||
"tail_decode_ms": 352.4101550001433,
|
||||
"flush_ms": 0.06503600025098422,
|
||||
"final_text": "昨天是 MONDAY TODAY IS LIBR THE DAY AFTER TOMORROW是星期三",
|
||||
"n_partials": 91
|
||||
},
|
||||
"stt_1.wav": {
|
||||
"audio_s": 5.1,
|
||||
"total_s": 2.1389257700002418,
|
||||
"rtf": 0.35064356885249864,
|
||||
"rtf_speech_only": 0.419397209803969,
|
||||
"chunk_ratio_p50": 0.003521949997775664,
|
||||
"chunk_ratio_p95": 1.1893300500014448,
|
||||
"chunk_ratio_max": 1.1938205499973265,
|
||||
"first_partial_audio_s": 1.4,
|
||||
"tail_decode_ms": 356.69890200006193,
|
||||
"flush_ms": 0.02634899965414661,
|
||||
"final_text": "这是第一种第二种叫呃与 ALWAYS ALWAYS什么意思啊",
|
||||
"n_partials": 38
|
||||
},
|
||||
"stt_2.wav": {
|
||||
"audio_s": 4.69,
|
||||
"total_s": 2.0203764259999843,
|
||||
"rtf": 0.3550749430579937,
|
||||
"rtf_speech_only": 0.43078388614072155,
|
||||
"chunk_ratio_p50": 0.00355069999841362,
|
||||
"chunk_ratio_p95": 1.188613239996812,
|
||||
"chunk_ratio_max": 1.209888459998183,
|
||||
"first_partial_audio_s": 0.5,
|
||||
"tail_decode_ms": 356.0279449998234,
|
||||
"flush_ms": 0.02447099996061297,
|
||||
"final_text": "这是不是平凡的啊不认识你记下来 FREQUENTLY频繁的",
|
||||
"n_partials": 43
|
||||
},
|
||||
"stt_3.wav": {
|
||||
"audio_s": 8.83,
|
||||
"total_s": 3.5579121109999505,
|
||||
"rtf": 0.36194426358086984,
|
||||
"rtf_speech_only": 0.4029345539071292,
|
||||
"chunk_ratio_p50": 0.0035380899998926907,
|
||||
"chunk_ratio_p95": 1.1881532100005643,
|
||||
"chunk_ratio_max": 1.1958122499981982,
|
||||
"first_partial_audio_s": 1.1,
|
||||
"tail_decode_ms": 355.65589199995884,
|
||||
"flush_ms": 0.024543000108678825,
|
||||
"final_text": "第一句是个什么时态在加了 ES是一般现在时对吧后面那还有时时态来语写上上去了",
|
||||
"n_partials": 79
|
||||
}
|
||||
},
|
||||
"verdict": "⚠ 平均够但存在突发积压风险"
|
||||
},
|
||||
"2": {
|
||||
"rows": {
|
||||
"stt_0.wav": {
|
||||
"audio_s": 10.053125,
|
||||
"total_s": 2.578806391999933,
|
||||
"rtf": 0.23331016269154045,
|
||||
"rtf_speech_only": 0.25651788792041613,
|
||||
"chunk_ratio_p50": 0.003629650000220863,
|
||||
"chunk_ratio_p95": 0.7905124399985652,
|
||||
"chunk_ratio_max": 0.9809923500006335,
|
||||
"first_partial_audio_s": 1.1,
|
||||
"tail_decode_ms": 221.97086599999238,
|
||||
"flush_ms": 0.05037600021751132,
|
||||
"final_text": "昨天是 MONDAY TODAY IS LIBR THE DAY AFTER TOMORROW是星期三",
|
||||
"n_partials": 91
|
||||
},
|
||||
"stt_1.wav": {
|
||||
"audio_s": 5.1,
|
||||
"total_s": 1.3411688280002636,
|
||||
"rtf": 0.2198637422951252,
|
||||
"rtf_speech_only": 0.2629742800000517,
|
||||
"chunk_ratio_p50": 0.0035533499976736493,
|
||||
"chunk_ratio_p95": 0.7596391700008098,
|
||||
"chunk_ratio_max": 0.7848052599956645,
|
||||
"first_partial_audio_s": 1.4,
|
||||
"tail_decode_ms": 222.9477579999184,
|
||||
"flush_ms": 0.024468999981763773,
|
||||
"final_text": "这是第一种第二种叫呃与 ALWAYS ALWAYS什么意思啊",
|
||||
"n_partials": 38
|
||||
},
|
||||
"stt_2.wav": {
|
||||
"audio_s": 4.69,
|
||||
"total_s": 1.2377910049999628,
|
||||
"rtf": 0.2175379622144047,
|
||||
"rtf_speech_only": 0.2639213230277106,
|
||||
"chunk_ratio_p50": 0.003542499998729909,
|
||||
"chunk_ratio_p95": 0.7229457900029956,
|
||||
"chunk_ratio_max": 0.7791545099962605,
|
||||
"first_partial_audio_s": 0.5,
|
||||
"tail_decode_ms": 223.60373099991193,
|
||||
"flush_ms": 0.024873000256775413,
|
||||
"final_text": "这是不是平凡的啊不认识你记下来 FREQUENTLY频繁的",
|
||||
"n_partials": 43
|
||||
},
|
||||
"stt_3.wav": {
|
||||
"audio_s": 8.83,
|
||||
"total_s": 2.189363661999778,
|
||||
"rtf": 0.2227226512715949,
|
||||
"rtf_speech_only": 0.24794605458661131,
|
||||
"chunk_ratio_p50": 0.003571679999367916,
|
||||
"chunk_ratio_p95": 0.7330924600000799,
|
||||
"chunk_ratio_max": 0.8176678099971468,
|
||||
"first_partial_audio_s": 1.1,
|
||||
"tail_decode_ms": 213.40833099975498,
|
||||
"flush_ms": 0.025572000140527962,
|
||||
"final_text": "第一句是个什么时态在加了 ES是一般现在时对吧后面那还有时时态来语写上上去了",
|
||||
"n_partials": 79
|
||||
}
|
||||
},
|
||||
"verdict": "可实时"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user