This repository contains an ERes2NetV2 speaker verification model exported from
the original PyTorch checkpoint to Hugging Face style safetensors format.
model.safetensorsconfig.jsonThe exported weights are converted from:
model-bin/speech_eres2netv2_sv_zh-cn_16k-common/pretrained_eres2netv2.ckpt
.
|-- config.json
|-- model.safetensors
`-- README.md
config.json keeps the model metadata used by this project and points
pretrained_model to model.safetensors.
Use the project inferencer:
from campplus_sid.inferencer.inferencer import Inferencer
inferencer = Inferencer.from_pretrained(
"model-bin/safetensor/speech_eres2netv2_sv_zh-cn_16k-common",
device="cpu",
)
For direct weight loading:
from safetensors.torch import load_file
state_dict = load_file(
"model-bin/safetensor/speech_eres2netv2_sv_zh-cn_16k-common/model.safetensors"
)
The model expects normalized 80-bin fbank features with shape:
batch, frames, feature_dim
In this project, raw 16 kHz audio is converted to fbank features by the
Inferencer before the model forward pass.
This architecture is associated with the 3D-Speaker speaker recognition work:
https://github.com/alibaba-damo-academy/3D-Speaker
The exported model.safetensors was validated by loading all tensors and
checking the state dict against the ERes2NetV2 model definition with no missing
or unexpected keys.