Save voice clone to voice state (safetensors)?

#3
by timonvanhasselt - opened

Hi, thanks for your fast conversion to ONNX of the v2 model of PocketTTS. I saw they now use safetensors for the voice states to load voices faster. Do you think you can integrate it in your pocket_tts_onnx wrapper? Now I use the voice clone conversion code from pocket TTS to save the voice clone wav as a .npy file and that also still works, but I have the feeling te voice states in the safetensors are a little bit faster.
https://kyutai-labs.github.io/pocket-tts/API%20Reference/python-api/#export_model_state
https://github.com/kyutai-labs/pocket-tts/blob/5304da453bf3f8deb40d8d440e44ab9858bca7a7/pocket_tts/models/tts_model.py#L1046
Downside it seems is that the conversion needs torch, and I would like to keep using your wrapper instead of the whole pocketTTS repo and deps. Maybe there's a workaround for torch?
Thanks for considering.

Thanks for raising this point, I hadn't seen that. I am not likely to change anything as I think the difference would be negligible. As long as you're skipping the encoding step, you're going to be down to a few ms to load the voice embedding. The highest benefit is keeping them loaded in RAM rather than loading off disk at inference time, unless that's not workable for your environment.

KevinAHM changed discussion status to closed

Sign up or log in to comment