Replies: 21 comments 7 replies
-
I think it should be possible to load PyTorch models in most languages like e.g. with DJL from Amazon for Java. Also, I am not sure, but isn't it possible to convert load pretrained PyTorch models and to convert them to ONNX models anytime? So if someone needs them he could do the conversion by himself. I remember that I read something like that, but not sure about the details or if there were requirements. I have not used the ONNX models though. Maybe someone will respond that has used the ONNX models and could explain why it would be good if they would remain 😄 |
Beta Was this translation helpful? Give feedback.
-
ONNX models are created from nn.Module or JIT models in torch. The key issue for me here is not really maintaining or creating the models, but since we have been able to radically simplify everything, just leaving one VAD model for everything seems enticing (different SR, variable chunk size, much less code for iterators, etc). The problem is that ONNX does not support if statements and new JIT models have one if statement inside. |
Beta Was this translation helpful? Give feedback.
-
I thought we can export ONNX model if use JIT script models even though got if statement? I prefer ONNX model because don't want to install torch in my prod env |
Beta Was this translation helpful? Give feedback.
-
Can you provide a minimal working export example with if? |
Beta Was this translation helpful? Give feedback.
-
Sure, https://colab.research.google.com/drive/1sl33VBqT8fy46zyrhU1gVjWJOKw0Ya1i?usp=sharing |
Beta Was this translation helpful? Give feedback.
-
In case you guys don't want to share onnx anymore, can share jit model without quantization? |
Beta Was this translation helpful? Give feedback.
-
Text enhancement has a lot of logic under the hood, so no ONNX planned there by design |
Beta Was this translation helpful? Give feedback.
-
Nice, many thanks Tbh, I did not know that control flows are supported, but only in scripting model Probably we may opt for the following solution
|
Beta Was this translation helpful? Give feedback.
-
Yeah, saw a lot of function in it like enhance text, unitoken_into_token, process_unicode etc |
Beta Was this translation helpful? Give feedback.
-
cool, later when you guys share vad.jit I might try export it to onnx |
Beta Was this translation helpful? Give feedback.
-
Tucking this in was a design decision, because we wanted to package and support as little as possible |
Beta Was this translation helpful? Give feedback.
-
Ohh ok got it |
Beta Was this translation helpful? Give feedback.
-
There are some low level cryptic errors for some reason, basically saying that some data type becomes We want to radically simplify everything and having more than one variety model is a no-no for future. We had to be inventive to have the best quality, you will see in the PR releases after the VAD release. |
Beta Was this translation helpful? Give feedback.
-
Ohhh, might be bug in onnx graph code |
Beta Was this translation helpful? Give feedback.
-
In the end we could solve all of the ONNX problems that we could identify (with our custom modules), but ended up with cryptic export errors nonetheless. Turns out for "if-less" models we just used tracing, which produced horribly looking, but working models. For models with ifs (they need scripting) we could beat the ONNX limitations and polish our custom modules to be compatible, but ended up with more cryptic errors. We will have a final module by module debugging session some time 1Q next year. For now we decided to opt for simplicity and collect feedback. |
Beta Was this translation helpful? Give feedback.
-
Congratulations on the new release, looks really exciting! We were using the Silero VAD ONNX models via the onnxruntime JavaScript package. It looks like there are a few JavaScript PyTorch/TorchScript bindings that might work (though I haven't tried yet), but they don't look nearly as well-maintained or commonly-used as the ONNX runtime, so would love to have an ONNX model for this new version. The limitations you mention (e.g., 16k only) seem totally reasonable. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The above comments make sense. Most likely we will just publish a 16 kHz ONNX model, and postpone a unified model for the time being (or just reserve it only for commercial customers, idk, I do no want more than 1 VAD at the moment, or it will turn into chaos again). Also a But who knows, some feedback or help on properly adding a python conda package with Github actions may be appreciated. |
Beta Was this translation helpful? Give feedback.
-
All of the ONNX runtime adopters, rejoice |
Beta Was this translation helpful? Give feedback.
-
Silero VAD: Support For Sampling Rates Higher Than 16 kHz
You can also average over every 2 or 3 samples manually and just use 16 kHz if you want. |
Beta Was this translation helpful? Give feedback.
-
Hm as far as i see the onnx model is still alive but reading this thread makes me worry about if new projects should use onnx or not. |
Beta Was this translation helpful? Give feedback.
-
In a few days we will be radically changing the models:
i.e. we will be radically simplifying everything.
We have seen limited use of ONNX models, so therefore I am asking.
Beta Was this translation helpful? Give feedback.
All reactions