X Tutup
Skip to content

Add ECAPA2 to VoxCeleb#3039

Open
othman-istaiteh wants to merge 8 commits intospeechbrain:developfrom
othman-istaiteh:add-ecapa2
Open

Add ECAPA2 to VoxCeleb#3039
othman-istaiteh wants to merge 8 commits intospeechbrain:developfrom
othman-istaiteh:add-ecapa2

Conversation

@othman-istaiteh
Copy link

What does this PR do?

This PR implements the ECAPA2 model architecture and its corresponding training recipe for VoxCeleb.

Key Additions:

  • speechbrain/lobes/models/ECAPA2.py: Implementation of the ECAPA2 architecture and SubCenterClassifier.
  • speechbrain/nnet/losses.py: Added JeffreysLoss for embedding regularization.
  • VoxCeleb Recipe (recipes/VoxCeleb/SpeakerRec/):
    • Added train_ecapa2.yaml and verification_ecapa2.yaml.
    • Updated train_speaker_embeddings.py and speaker_verification_cosine.py to support the new model and pipeline requirements.
    • Handled backward compatibility natively; existing models (X-Vector, ResNet, ECAPA-TDNN) run without modification.

Testing & Validation:

  • Added ECAPA2 testing vectors to tests/recipes/VoxCeleb.csv.
  • Ran pytest tests to ensure existing functionality remains intact.
  • Passed all doctests.
  • Ran pre-commit run -a to verify strict code formatting and linting.

Performance:

Trained on VoxCeleb 1 + VoxCeleb 2:

  • VoxCeleb1-O: 0.60% EER (with s-norm) / 0.70% EER (without s-norm)

Trained on VoxCeleb 2 only (tested without s-norm):

  • VoxCeleb1-O: 0.79% EER
  • VoxCeleb1-E: 1.00% EER
  • VoxCeleb1-H: 1.76% EER

Fixes N/A

Breaking changes: None. Backward compatibility is maintained for existing VoxCeleb scripts.

Before submitting
  • Did you read the contributor guideline?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Does your code adhere to project-specific code style and conventions?

PR review

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified
  • Confirm that the changes adhere to compatibility requirements (e.g., Python version, platform)
  • Review the self-review checklist to ensure the code is ready for review

@othman-istaiteh othman-istaiteh marked this pull request as ready for review March 4, 2026 18:39
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

X Tutup