← Back to Leaderboard
Vxzf-thu

xzf-thu/VoiceMem

Streaming dual-brain memory for factual and personal recall in real-time voice agents

View on GitHub ↗
Engineering Health (Methodology)
B+ · 75/100
Maintenance Activity
● Updated 2mo ago
Latest Release
v0.0.2
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance20/35
Fork Adoption18/25
Release Cadence17/20
License Clarity20/20
Local AIAPI
Total Stars
★ 2,907
24h Growth
+1
7d Growth
+3
Forks
268

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

xzf-thu/VoiceMem Star History (2026-08-22 - 2026-12-04) ALL-TIME STAR HISTORY (2026-08 – 2026-12) +2.9k in 104d · avg +28/day 3.1k 1.5k 0 2026-08-22: ★ 12026-08-29: ★ 2252026-09-05: ★ 7672026-09-12: ★ 1,3412026-09-19: ★ 1,8322026-09-26: ★ 2,1112026-10-03: ★ 2,3052026-10-10: ★ 2,4272026-10-17: ★ 2,5522026-10-24: ★ 2,6682026-10-31: ★ 2,7872026-11-07: ★ 2,8792026-11-14: ★ 2,8902026-11-21: ★ 2,8962026-11-28: ★ 2,9042026-12-04: ★ 2,907 ★ 2.9k 08-22 10-13 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

VoiceMem is a Python memory layer for voice agents, not a general-purpose vector database. Its “left brain” organizes factual memory by schema and entity; its “right brain” models emotion, personality, and relationships with standalone and cross-entity nodes. Retrieval routes a query before ranking candidates, then supplies only the Top-K memories to the reply model. Writes do more work: extract facts, label them, and update the memory graph.

The base package bundles VAD, ASR, speaker identification, scene and emotion models, and local embeddings. Partial transcripts can trigger speculative retrieval while the user is still speaking. The streaming example feeds PCM chunks asynchronously and reads results when VAD closes the turn; it then calls text ingestion explicitly, so finishing a stream turn is not itself a persistence guarantee. A reply callback keeps the response model separate from memory retrieval.

Key Capabilities & Differentiators

The API supports direct text and audio-file ingestion as well as streaming PCM. leftbrain_only is available for fact-only workloads. Streaming results can include speaker ID and voiceprint, emotion, schema, entity, and text embedding alongside the transcript and recalled memories. Memory-aware model families include Qwen2.5-Omni, Qwen3-Omni, and Step-Audio2-Mini; finetune/train.py provides an adapter training path rather than making those models a runtime requirement for every integration.

Published figures include 91.2% on LoCoMo at Top-5, 69.44% on PersonaMem, 134 ms response time, and 430 memory-context tokens. A separate LoCoMo CLI example reports 139/152 (91.4%), 12 ms median retrieval latency, and 298 median retrieved tokens. These are distinct measurements: retrieval latency is not end-to-end time to audible reply. The evaluation runner withholds raw dialogue history from the answering model, so answers depend on what retrieval actually supplies.

Trade-offs & Limitations

Compared with using Mem0 or EverMemOS strictly as text-memory baselines, VoiceMem's distinguishing design is its audio perception layer and ability to start recall before turn completion. The published comparison is useful for choosing what to test, not for predicting production latency or cost. Top-K limits the prompt footprint but can omit context for multi-hop or temporal questions. Preserving dated facts is preferable to overwriting them when users' circumstances change, but the reply model still has to interpret which fact is current.

Prefetch moves retrieval off part of the post-turn critical path; it does not remove final ASR processing, generation, or TTS. Measure latency to the first audible reply, write-to-recall lag, and recall quality when partial transcripts change. Voiceprints and inferred emotional attributes also raise the cost of operating this layer: set consent, access, retention, and deletion rules. Treat the demo's session and memory-space separation as behavior to verify, not as proof of production tenant isolation.

Hardware & Deployment Guide

Use Python 3.10+ and install with pip install voicemem. Download zhifeixie/VoiceMem_Default_Models_Env into ./models with hf download, then call vm.warmup() so lazy initialization does not land on the first audio chunk. The optional voicemem[slm] extra is shown for the fine-tuned Qwen reply path. Local retrieval does not establish a fully offline pipeline: the normal ingestion and streaming examples configure an OpenAI key. Verify extraction and reply backends separately before deploying without network access.

For the browser demo, clone the repository and run python web/run.py; it listens at localhost:8787. Terminal logs are written to disk by default; use --no-file-log to disable that file output. The v0.0.2 release fixes event-date propagation, removes the unused response_experience category, and makes TTS pluggable. The supplied pyproject.toml shows 0.2.3 while the GitHub release tag is v0.0.2, so pin and test the exact package or checkout you deploy.

Memory structure: Schema- and entity-organized facts are separate from emotion, personality, and relationship nodes.
Turn-level prefetch: Partial ASR text can trigger retrieval before VAD closes the turn; the streaming API exposes results at turn_over.
Temporal recall: v0.0.2 carries event dates into retrieval and context, allowing older and newer facts to coexist.
Replaceable generation and speech: VoiceMem(reply=...) accepts a custom generator, and the demo's TTS interface can return TimedAudioChunk for text alignment.
Playback-aware session history: The WebSocket demo tracks rendered audio so an interruption does not record the unplayed reply as heard.
Controlled memory evaluation: evaluation/run.py withholds raw dialogue history from the answer model; --inspect parses inputs without model calls.
Best For

Real-time voice assistants that need persistent facts and personal context, want recall to begin during speech, and can validate their own model backends and audio latency.

Skip If

You only need a general-purpose vector store or finalized-text retrieval, or you require a turnkey, fully offline, multi-tenant service with established production guarantees.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIAPI
git clone https://github.com/xzf-thu/VoiceMem.git
cd VoiceMem

# 安装记忆系统(含 ASR / 声纹 / 场景 / 情绪 / 本地 embedding 全套内置组件)
pip install voicemem

# 可选:用我们微调的 Qwen 回复模型
pip install "voicemem[slm]"

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
VoiceMem ★2.9k+3PythonApache-2.0Streaming dual-brain memory for factual and personal recall in real-time voice a
mem070k+498PythonApache-2.0A vector-backed memory layer for AI agents that need to recall past conversation
Memori17.9k+337Python—An SDK-based agent memory layer for persistent state across sessions.
OpenViking43.2k+255PythonAGPL-3.0A directory-scoped RAG database for inspectable agent knowledge and memory

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/xzf-thu/VoiceMem.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

xzf-thu/VoiceMem Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about VoiceMem

Can I keep my existing voice model and use VoiceMem only for memory?

Use ingest() and search() to add and retrieve memories independently of generation. For live audio, pass PCM chunks to vm.stream(...).feed() and read the transcript and retrieval results at turn_over. If you want VoiceMem to call your generator, supply VoiceMem(reply=my_reply); the callback receives the current text and memory context.

How should I size a host for live audio?

No fixed minimum GPU or VRAM requirement is specified. Size the service with the actual ASR, speaker, scene, emotion, and embedding models you plan to load. Call vm.warmup() before measuring steady-state performance, then measure cold-start time, RAM and GPU memory where applicable, and tail latency at your target stream concurrency. Budget separately for local reply generation if you enable it.

Can I self-host VoiceMem commercially, and what still needs review?

Apache-2.0 permits commercial use of the repository code subject to its terms, including applicable notice requirements when redistributing it. Review model weights, datasets, and external API terms separately. Self-hosting also does not settle privacy obligations: verify which stages send data off-host and set access, retention, and deletion policies for voiceprints, inferred attributes, and logs.

When should I evaluate VoiceMem instead of Mem0?

Evaluate VoiceMem when partial speech, speaker signals, or compact memory prompts are central to the product. If your system already receives finalized text and needs only conventional recall, use Mem0 as a baseline before taking on the audio stack. Compare the systems on the same sessions with the same answer model, retrieval budget, and latency measurement boundaries; published figures alone do not make those conditions equivalent.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining xzf-thu/VoiceMem? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature xzf-thu/VoiceMem on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare