How eulemitkeule/speaker-recognition works
This repository provides speaker identification as a service, a Python client, a Home Assistant integration, and an addon deployment. The main workflow trains on voice samples, caches speaker embeddings, and recognizes speakers from incoming audio. Home Assistant can send voice samples and recognition audio to the backend; its STT entity also shares recent recognition results with the conversation agent to enrich user context. The addon is documented as a deployment option, but its runtime wiring was not sampled.
Main entry points: api.py REST API · __main__.py Service CLI · stt.py STT entity · client.py Python client
Components 20
Recognition service
- Service CLI
speaker_recognition/__main__.py - REST API
speaker_recognition/api.py - Request models
speaker_recognition/models.py - Speaker recognizer
speaker_recognition/recognizer.py - Embedding files
speaker_recognition/recognizer.py - Service settings
speaker_recognition/const.py - Logging setup
speaker_recognition/logging_config.py
Python client
- Python client
speaker_recognition/client.py
Home Assistant integration
- Integration setup
custom_components/speaker_recognition/config_flow.py - Integration lifecycle
custom_components/speaker_recognition/__init__.py - Integration settings
custom_components/speaker_recognition/const.py - HA recognition client
custom_components/speaker_recognition/recognition.py - STT entity
custom_components/speaker_recognition/stt.py - Conversation agent
custom_components/speaker_recognition/conversation.py
Home Assistant addon
- Addon runtime
speaker_recognition_addon/rootfs/etc/s6-overlay/s6-rc.d/speaker-recognition/run
Other components
- API consumer
- Home Assistant user
- Source STT platform
- Source conversation agent
- HA event and state data
Connections 26
- API consumer → REST API: sends API requests
README.md - Service CLI → REST API: serves
speaker_recognition/__main__.py - Service CLI → Logging setup: configures
speaker_recognition/__main__.py - Service CLI → Service settings: sets
speaker_recognition/__main__.py - REST API → Request models: uses schemas
speaker_recognition/api.py - REST API → Speaker recognizer: dispatches training and recognition
speaker_recognition/api.py - Speaker recognizer → Request models: accepts and returns
speaker_recognition/recognizer.py - Speaker recognizer → Embedding files: reads and writes
speaker_recognition/recognizer.py - API consumer → Python client: calls
README.md - Python client → REST API: sends HTTP requests
speaker_recognition/client.py - Python client → Request models: serializes and parses
speaker_recognition/client.py - Home Assistant user → Integration setup: configures
README.md - Integration setup → Integration settings: uses settings
custom_components/speaker_recognition/config_flow.py - Integration lifecycle → Integration settings: uses settings
custom_components/speaker_recognition/__init__.py - Integration lifecycle → HA recognition client: sets up
custom_components/speaker_recognition/__init__.py - Home Assistant user → Integration lifecycle: provides voice samples
README.md - HA recognition client → Python client: calls backend client
custom_components/speaker_recognition/recognition.py - HA recognition client → REST API: trains and recognizes via HTTP
README.md - STT entity → HA recognition client: recognizes buffered audio
custom_components/speaker_recognition/stt.py - STT entity → Source STT platform: forwards audio stream
custom_components/speaker_recognition/stt.py - STT entity → HA event and state data: fires event and stores result
custom_components/speaker_recognition/stt.py - Conversation agent → HA event and state data: reads recent result
custom_components/speaker_recognition/conversation.py - Conversation agent → Source conversation agent: forwards enriched input
custom_components/speaker_recognition/conversation.py - Home Assistant user → STT entity: uses speech-to-text
README.md - Home Assistant user → Conversation agent: uses voice commands
README.md - Addon runtime → Service CLI: launches service
README.md