CoolFace
Modelpublic

aloxaf/anime-speaker-embedding-char-onnx

sourceHugging Facemitupdated 11d agoView on Hugging Face
0likes
Model Card

Anime Speaker Embedding char — ONNX conversion

This is an ONNX conversion of the char variant of litagin/anime_speaker_embedding_ecapa_tdnn_groupnorm, created by litagin02. It is a format conversion, not a newly trained model. The original model card marks the model as MIT licensed; attribution and the original documentation remain with the upstream author.

Input and output

  • —Input waveform: mono 16 kHz audio samples, float32, shape [1, samples]. The sample dimension is dynamic; the exported model supports batch size 1.
  • —Output embedding: L2-normalized 192-dimensional speaker embedding, float32, shape [1, 192].
  • —The graph includes amplitude normalization, the original ×32768 scaling, SpeechBrain Fbank features, the ECAPA-TDNN GroupNorm backbone, and final L2 normalization. Audio decoding and resampling are outside the graph.
python
import librosa
import onnxruntime as ort

waveform, _ = librosa.load("speech.wav", sr=16_000, mono=True)
session = ort.InferenceSession("anime_char.onnx", providers=["CPUExecutionProvider"])
embedding = session.run(["embedding"], {"waveform": waveform[None, :]})[0]

Provenance and conversion

  • —Source repository snapshot: a2c81c47ee0b9fbfb744ad49849625645867129d
  • —Source embedding_model.pth SHA256: d0386125a7a55d99edd4c711224386d92682d99ae8575ed479e37532a58a346d
  • —ONNX file SHA256: 4a36f0e774771e1967d70abd63cba44f97a9fedf32d065e9a3d5ea09c8299e74
  • —ONNX opset: 18

The upstream SpeechBrain STFT returns a complex tensor and then converts it to real values. PyTorch 2.8's legacy ONNX exporter could not export that path, so this conversion uses the equivalent torch.stft(return_complex=False) output before the unchanged Fbank and backbone. The exported graph runs with ONNX Runtime and does not require PyTorch or SpeechBrain at inference time.