xzf-thu/VoiceMem

Infrastructure for the next generation of voice agents, designed to provide universal memory. It is divided into a left brain and a right brain, storing information and emotions respectively, while a fully streaming architecture eliminates latency at the fundamental level.

Open original source ↗

Older snapshot: check the original source for current information.

From the publisher

README & documentation

Source preview

Read the project’s overview, installation instructions and usage examples. The original README is the source of truth.

中文 | English 项目主页 🌐 / 技术报告 📖 / VoiceMem Utils 🤗 / VoiceMem Model Families 🤗 / ChatMem-400K 🤗 我们带来 VoiceMem,为语音模型增加最后一个组件:灵魂,让它真正越来越懂你。VoiceMem 建立在「流式双脑」架构之上,提供精准、有情感、懂人格、低延迟且最便宜的记忆服务。本仓库将「永久保持全部开源」。 快速理解 VoiceMem: https://github.com/user-attachments/assets/0d919f8c-e9ba-4fdb-8078-b049e4b99a28 可以把 VoiceMem 的流式接口看作一个持续处理音频的 VAD 接口。 下面这段:先显式存一条事实,再喂一段问句音频,看记忆是怎么在人还没说完时就查好的;最后照例走一次入库判断。 演示代码在仓库里(pip 装的包只有库本身),先确认已经克隆并进入仓库目录。 然后访问: Demo 默认把终端输出(含 Python logging 和 Uvicorn 的日志)保存一份到 results/logs/voicemem-时间-PID.log,每行带时间戳和 stdout/stderr 标记。 启动时终端会打印实际路径。指定文件或临时关闭如下。 回复模型的上下文由当前输入、本次会话尚未入库的对话和检索记忆组成。每轮对话先 进入内存 SessionBuffer;异步记忆写入完成并确认产生持久记忆后,对应 turn 从 SessionBuffer 移除。没有产生长期记忆的临时对话会保留到本次会话结束,不同 Memory Space 和不同 WebSocket 会话互相隔离。 播放期间的插话使用两阶段控制:VAD 首先暂停并保留音频队列;明确停止指令或稳定 ASR 文本确认后才清空队列并取消回复;附和、回声、无文字声音和单音节碎片会恢复 播放。候选静音回退和最长等待时间可分别通过 BARGEREJECTSILENCEMS、 BARGECANDIDATETIMEOUTMS 调整。 两种回复模式共用以 PCM 样本位置为基准的输出时间轴。浏览器 AudioWorklet 回报 实际渲染进度,打断时只把已经播放的回复写入 SessionBuffer。TTS 后端可选返回 TimedAudioChunk 提供文字对齐;普通 PCM 后端按分段音频长度和动态语速估算。 VoiceMem 是一个面向实时语音智能体的记忆系统。 VoiceMem 不把所有记忆放进同一个检索数据库,而是将记忆拆分成两个互相配合的部分: 整个流程都是流式的。 在用户仍然说话时,VoiceMem 会持续完成音频分段、语音转写、记忆提取,并把结构化信息写入记忆图中。 查询时,VoiceMem 会先路由,再排序,最后只把 Top-K 条记忆注入模型上下文,从而在保留相关信息的同时控制上下文长度。 我们通过三阶段 OPD 训练流程构建 ChatMem-400K: 同一套流程在人工编辑后形成 ChatMem-Bench,评测语音模型是否能够在长期沉淀中形成对用户的理解。 VoiceMem 家族开源模型包括 Qwen2.5-Omni、Qwen3-Omni 和 Step-Audio2-Mini。这些模型可以在对话时接受并理解 VoiceMem 提供的记忆信息。 你可以将 VoiceMem 接入自己的语音模型,用于构建带有长期记忆能力的实时语音智能体。 整体流程如下: 麦克风 → VoiceMem 监听语音并提前检索相关记忆 → 你的模型读取这些记忆并生成回答 换成你自己的模型:把生成那一步换掉就行,记忆那半边一行都不用动。 VoiceMem 提供完整的微调代码,可用于训练自己的 VoiceMem Model…

xzf-thu/VoiceMem on GitHub A short preview, not the full document.

Read the full README ↗ · Preview checked 2026-10-30T07:42:32.248Z

Inside the original README — Document outline
  1. 🔥 News
  2. 🎬 Demo
  3. 📚 目录
  4. 🚀 快速开始
  5. 安装
  6. 下载所需模型
  7. 基础用法
  8. 作为离线记忆引擎运行
  9. 以流式方式运行 VoiceMem
  10. VoiceMem 交互式演示
  11. 🧠 VoiceMem:基于流式双脑架构的记忆系统
  12. 主要特性

Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.

Links from the README

References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.

Documentation belongs to its respective authors. Reported project/model license: Apache-2.0. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.

What this repository does

Infrastructure for the next generation of voice agents, designed to provide universal memory. It is divided into a left brain and a right brain, storing information and emotions respectively, while a fully streaming architecture eliminates latency at the fundamental level.

Repository facts

Owner
xzf-thu
Primary language
Python
Stars
1,811
Forks
118
Open issues + pull requests
7
License
Apache-2.0
Archived
No
Default branch
main
Created
2026-08-17T09:49:10.000Z
Last push
2026-09-14T06:01:08.000Z

Topics and intended use

Owner-supplied topics: ai, ai-agents, ai-tools, application, audio-streaming, genai, llm, long-term-memory, memory, memory-management, python, voice-agent, voice-assistant

Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.

Evaluate before installing

Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.

README and project files

Issues and maintenance discussion

Releases and changelog

Source and freshness

Source: GitHub. Metadata observed 2026-09-16T06:39:41.137Z. Daily imports are snapshots, not real-time monitoring.

Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.

Open original source

Related repositories

public-apis/public-apis

EbookFoundation/free-programming-books

donnemartin/system-design-primer

vinta/awesome-python

practical-tutorials/project-based-learning

NousResearch/hermes-agent