Skip to content

fix(config): add face/speaker recognition constants and register insightface + speaker-recognition#10110

Open
Dennisadira wants to merge 1 commit into
mudler:masterfrom
Dennisadira:fix/face-speaker-backend-capabilities
Open

fix(config): add face/speaker recognition constants and register insightface + speaker-recognition#10110
Dennisadira wants to merge 1 commit into
mudler:masterfrom
Dennisadira:fix/face-speaker-backend-capabilities

Conversation

@Dennisadira
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #10107. `insightface` and `speaker-recognition` were the two backends left unregistered in that PR because they use gRPC methods that had no `Method*`/`Usecase*` constants yet.

`FLAG_FACE_RECOGNITION` and `FLAG_SPEAKER_RECOGNITION` already existed as `ModelConfigUsecase` bitmask flags, and `GuessUsecases` already gate-checks both backends by name — but `BackendCapabilities` had no entries, so the UI couldn't classify them.

New constants:

Constant Value
`MethodFaceVerify` `"FaceVerify"`
`MethodFaceAnalyze` `"FaceAnalyze"`
`MethodVoiceVerify` `"VoiceVerify"`
`MethodVoiceEmbed` `"VoiceEmbed"`
`MethodVoiceAnalyze` `"VoiceAnalyze"`
`UsecaseFaceRecognition` `"face_recognition"` → `FLAG_FACE_RECOGNITION`
`UsecaseSpeakerRecognition` `"speaker_recognition"` → `FLAG_SPEAKER_RECOGNITION`

New backend entries:

Backend Methods Usecases
`insightface` Embedding, Detect, FaceVerify, FaceAnalyze embeddings, detection, face_recognition
`speaker-recognition` VoiceVerify, VoiceEmbed, VoiceAnalyze speaker_recognition

All five new `Method*` constants match the RPC names in `backend/backend.proto` verbatim. `UsecaseInfoMap` entries wire each new usecase to its primary RPC and existing flag.

Test plan

  • `gofmt -e` on the edited file: clean
  • Configure an `insightface` model → should appear in the face-recognition selector
  • Configure a `speaker-recognition` model → should appear in the speaker-recognition selector

🤖 Generated with Claude Code

…ghtface + speaker-recognition

FLAG_FACE_RECOGNITION and FLAG_SPEAKER_RECOGNITION already existed as
ModelConfigUsecase bitmask flags, and GuessUsecases already gate-checks
both backends by name — but BackendCapabilities had no entries for
either, so the UI could not classify them.

Also missing were the Method* constants for the five proto-defined RPCs
these backends implement (FaceVerify, FaceAnalyze, VoiceVerify,
VoiceEmbed, VoiceAnalyze) and the corresponding Usecase* strings
and UsecaseInfoMap entries needed to wire them into the rest of the
capability system.

Changes:
- Add MethodFaceVerify, MethodFaceAnalyze, MethodVoiceVerify,
  MethodVoiceEmbed, MethodVoiceAnalyze GRPCMethod constants
- Add UsecaseFaceRecognition ("face_recognition") and
  UsecaseSpeakerRecognition ("speaker_recognition") Usecase constants
- Add UsecaseInfoMap entries for both new usecases, referencing the
  existing FLAG_FACE_RECOGNITION and FLAG_SPEAKER_RECOGNITION flags
- Register insightface: Embedding + Detect + FaceVerify + FaceAnalyze
- Register speaker-recognition: VoiceVerify + VoiceEmbed + VoiceAnalyze

Follows up on mudler#10107 which left these two out because they needed new
constants first.

Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant