snakers4 / silero-models

Silero Models: pre-trained speech-to-text, text-to-speech and text-enhancement models made embarrassingly simple
Other
5.01k stars 316 forks source link

❓ Questions / Help / Support #170

Closed 0xideas closed 2 years ago

0xideas commented 2 years ago

❓ Questions and Help

Hi, I am currently trying to export the attribute "model" of the model "v3_en" to onnx but have some difficulty finding the correct inputs. Can you help me out with this?

I have seen that the STT models are available in the ONNX format, but the TSS models aren't. Is there a specific reason for this? Is there a work around nonetheless?

Great project overall though, thanks!

snakers4 commented 2 years ago

Hi,

These TTS models as-is cannot be avaiable in ONNX by design, because they contain python logic inside of packages, and are not just plain computation graphs like JIT or ONNX models, but actually mini-packages.

This was done by design.

0xideas commented 2 years ago

Ok, thanks!

Is there a way to access the computation graph and export that, and recreate the python logic in a different language, for example?

snakers4 commented 2 years ago

This is defineltely possible, but currently out of scope for us.

Exporting models to ONNX has its merits (like easier quantization out-of-the-box, since some modules are still not working for us in PyTorch, at least some time ago), but with limited resources we cannot prioritise this and probably will reserve this for commercial customers requiring more flexibility when deploying their voices.