Views
No views yet
xocialize/emotion2vec-mlx-swift
Swift port. Refer to the original model card
for details.angry, disgusted, fearful, happy, neutral, other, sad, surprised, unknown)emotion2vec_large.safetensors — the MLX weights (fp16).emotion2vec_large_config.json — model config consumed by the loader.1import Emotion2VecMLX
2import Hub
3
4let dir = try await HubApi().snapshot(from: "mlx-community/emotion2vec-plus-large-mlx")
5let recogniser = try await EmotionRecogniser(weightsDirectory: dir,
6 config: EmotionRecogniserConfig(models: .categorical))
7let result = try await recogniser.classify(audioURL: speechURL)
8print(result.categorical.label, result.categorical.confidence)