CAM++: A Fast and Efficient Network for Speaker Verification Using Context-Aware Masking
Paper
•
2303.00332
•
Published
Converted from: iic/speech_campplus_sv_zh_en_16k-common_advanced
from huggingface_hub import snapshot_download
import mlx.core as mx
import sys
# Download model
model_path = snapshot_download("mlx-community/campp-mlx")
sys.path.append(model_path)
from model import CAMPPModel
import json
# Load model
with open(f"{model_path}/config.json") as f:
config = json.load(f)
model = CAMPPModel(
input_dim=config["input_dim"],
embedding_dim=config["embedding_dim"],
input_channels=config.get("input_channels", 64)
)
weights = mx.load(f"{model_path}/weights.npz")
model.load_weights(weights)
# Use model
audio_features = mx.random.normal((1, 320, 200)) # Your audio features
embedding = model(audio_features)
CAM++: A Fast and Efficient Network for Speaker Verification Using Context-Aware Masking https://arxiv.org/abs/2303.00332