Why
Voice retrieval uses LocalEmbedder (feature-hash-v1) — fast, no download, privacy-safe — but bag-of-words hashing is weak at rhythm/semantic near-matches. A pluggable local embedder would improve exemplar quality for write without sending text anywhere.
Goal
Keep the hash embedder as the default zero-dep path. Add an optional local model backend (e.g. small sentence-transformers / MLX embedding / ggml) behind a flag:
personality-protect index-voice --embedder hash # default
personality-protect index-voice --embedder local-mini # optional extra
Acceptance criteria
Pointers
src/personality_protect/embedder.py
src/personality_protect/voice_index.py
tests/test_voice_index.py
Out of scope
- Cloud embedding APIs
- Changing the public Contoso demo to require the heavy embedder
Difficulty
Medium–Hard — architecture is easy; model choice + packaging needs care.
Why
Voice retrieval uses
LocalEmbedder(feature-hash-v1) — fast, no download, privacy-safe — but bag-of-words hashing is weak at rhythm/semantic near-matches. A pluggable local embedder would improve exemplar quality forwritewithout sending text anywhere.Goal
Keep the hash embedder as the default zero-dep path. Add an optional local model backend (e.g. small sentence-transformers / MLX embedding / ggml) behind a flag:
Acceptance criteria
pip install -e ".[embed]")Pointers
src/personality_protect/embedder.pysrc/personality_protect/voice_index.pytests/test_voice_index.pyOut of scope
Difficulty
Medium–Hard — architecture is easy; model choice + packaging needs care.