Downloads · 30 days
0
ayodkay-hf/soninho-voice
soninho-voice is a machine learning model from ayodkay-hf. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for onnx. The card lists the license as mit.
An ONNX export of the speaker (tone colour) encoder from OpenVoice v2 by MyShell.ai, exported from the official converter/checkpoint.pth and verified against the reference implementation.
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2026
Repo size
7.5 MB
Likes
0
Public
Click a slice to open those files.
.onnx7.5 MB · 100%
From the Hugging Face model README
An ONNX export of the speaker (tone colour) encoder from
OpenVoice v2 by MyShell.ai, exported from
the official converter/checkpoint.pth and verified against the reference implementation.
Used by Soninho Mágico to let a family enrol a loved one's voice on device: the recording never leaves the phone, and only the resulting 256-float embedding is kept.
The model weights are the work of MyShell.ai, released under the MIT licence and
reproduced here in full in LICENSE. This repository contains only a format conversion —
no retraining, no fine-tuning, no change to the weights' values.
myshell-ai/OpenVoiceV2myshell-ai/OpenVoice| file | size | description |
|---|---|---|
tone_extract.onnx | 7.5 MB | audio → 256-float speaker embedding |
input audio float32 [1, N] mono, 22050 Hz, N dynamic
output embedding float32 [1, 256, 1]
The STFT is baked into the graph — the caller passes raw samples and does no signal processing of its own. Audio must be at 22050 Hz; the encoder does not resample, and feeding it another rate returns a confident embedding for a pitch-shifted voice rather than an error.
import numpy as np, onnxruntime as ort
sess = ort.InferenceSession("tone_extract.onnx")
embedding = sess.run(None, {"audio": audio_22050[None, :].astype(np.float32)})[0]
# -> (1, 256, 1)
Two details that are easy to get wrong, recorded because they cost real time:
torch.onnx.export(..., dynamo=False). Torch 2.13's default dynamo exporter fails to
decompose the reflect padding under a dynamic axis. The legacy TorchScript path handles it.torch.stft. OpenVoice already ships this as
spectrogram_torch_conv in openvoice/mel_processing.py, precisely because torch.stft
exports badly.Constants: n_fft 1024, hop 256, win 1024, magnitude sqrt(re² + im² + 1e-6), opset 17.
Cosine similarity against the reference ToneColorConverter.extract_se on the same audio:
torch wrapper vs official extract_se: cos=1.000000
ONNX vs official extract_se: cos=1.000000
Anything below ~0.999 means the graph is wrong rather than merely imprecise.
Built for consented voice enrolment in a children's bedtime-story app — a grandparent recording their own voice so it can read stories aloud.
The MIT licence imposes no use restrictions. The following are our requirements, not the licence's, and are stated here because anyone reusing this should think about them: