speaker-context-layer
Local MCP server for private, consent-based speaker identification and attribution, with per-language voiceprints and calibrated match thresholds. It lets AI assistants know who is speaking in a room or transcript without cloud services.
README
Speaker Context Layer
AI knows who logged in. It has no idea who is in the room.
A local MCP server that tells any AI assistant who is speaking. Voiceprints never leave your machine — no account, no cloud.
[Sammy]: We push the follow-up to Thursday.
[Amara]: I'll own the documentation pack.
[Wei]: Can we revisit the budget line first?
[UNKNOWN SPEAKER]: I don't agree with that.
Try it in two minutes
pip install git+https://github.com/sammyghe/speaker-context-layer.git
scl-demo
It asks for a name, records 8 seconds, repeats for each person — then guesses who is speaking. Nothing is kept: scl-demo --reset deletes it.
Use it in an assistant
Claude Code
claude mcp add speaker-context-layer -- speaker-context-layer
Claude Desktop — add to claude_desktop_config.json:
{ "mcpServers": { "speaker-context-layer": { "command": "speaker-context-layer" } } }
Then say:
Use
record_and_enrollto save my voice as Sammy in English — I consent, verbally, right now.
Setup for Gemini CLI and troubleshooting: docs/mcp-clients.md
Where it works, honestly
| Claude Code, Claude Desktop, Gemini CLI | Yes — local, today |
| Claude mobile / voice | Not yet — needs a remote server |
| ChatGPT text | Poorly — connectors are mostly limited to search/fetch |
| ChatGPT voice mode | No — MCP tools are switched off during voice conversations |
Voice mode is the least available place, which is the opposite of what you'd guess. An MCP tool call carries text — by the time the model calls a tool, the audio is already transcribed and gone, so no tool can reach the waveform it would need. Speaker identity has to be computed alongside a voice conversation by something holding the microphone, which is exactly what scl-room does.
Full explanation, and what a Connector Directory listing would cost: docs/where-it-runs.md
What it does that others don't
One person, several voiceprints — one per language. A voice embedding shifts when you switch language, so a code-switching speaker reads as two different people. Enroll each person once per language they use:
enroll_speaker(name="Sammy", language="en", ...)
enroll_speaker(name="Sammy", language="lg", ...)
It refuses to guess. Three answers, not two: a name, NEW_SPEAKER, or AMBIGUOUS when two people score too closely. Misattributing a decision is worse than admitting you don't know.
The threshold is yours, not inherited. Everyone else ships one number tuned on English-heavy data. On other accents that number is wrong — and it fails silently, returning a confident wrong name. So it ships unset, every answer is marked calibrated: false, and you fix it with your own voices:
scl-calibrate ./clips --population "Kampala team, EN/LG" --apply
It reports the gap between your worst genuine match and your best impostor — and refuses to invent a threshold when the two overlap.
The reasoning, the evidence, and what would prove it wrong: THESIS.md
Not authentication
Use it to label a transcript, follow a conversation, or caption a meeting. Never to unlock anything, approve a payment, gate access, or stand in for a signature. It cannot detect a recording or a cloned voice. A 0.96 score is not a signature.
Tools
| Tool | |
|---|---|
record_and_enroll |
Record a consenting person, store the print, delete the clip |
record_and_identify |
Record, identify, delete the clip |
enroll_speaker |
Store a voiceprint from a file |
identify_speaker |
Attribute a clip, or return NEW_SPEAKER / AMBIGUOUS |
list_known_speakers |
Roster, languages, consent records |
forget_speaker |
Erase one language or the whole person |
list_microphones |
Available inputs |
calibration_status |
Whether the threshold has been tested on your voices |
Writing tools refuse without consent_confirmed=true and a consent_method describing how the person agreed.
Your data
~/.speaker-context-layer/registry.json
Voiceprints, consent records, your threshold. Treat it as biometric data — it is gitignored, and CI fails the build if audio or a registry is ever committed. See SECURITY.md.
Honest status
v0.1.0. The logic is tested (22 tests, ~0.5s). Accuracy on real voices is not established — no calibration run has happened yet. That is the next real step, and the software tells you so on every answer instead of hiding it.
Composes with
pyannote.audio (MIT) for diarization on long recordings — this project does not attempt it. Picovoice Eagle drives the experimental live room (scl-room).
Roadmap
- [ ] Calibration on real Ugandan English, Luganda, and Swahili-English code-switching
- [ ] Published calibration profiles per population, so others start from a real number
- [ ] Evaluate Intron Sahara as an African-language embedding backend
- [ ] Consent ceremony on first contact — chime, ask, wait, then enroll
Credits
Built by Sammy Gedamu with Claude Code as engineering coworker — architecture, research, and implementation paired throughout.
MIT — see LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.