-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTS bug #1081
Comments
could you please tell us which model you are using? |
I tried almost all piper models, no matter what I use it seem problem persists. What is the difference between them? |
and like month ago it was working for me no problem, I changed nothing and it stopped working, only thing I had in my mind was libraries ver chages, but as I said I'm using onnx runtime and ml.llm packages alongside sherpa packages |
Could you post the complete code for reproducing? We have never encountered such an issue before. |
I'll post it in about 12 hours, thanks |
Okay I found the way how to replicate the issue, apparently Microsoft.ML.OnnxRuntimeGenAI once installed to your project it starts to happen. You can replicate the problem by adding Microsoft.ML.OnnxRuntimeGenAI of the latest 0.3.0v into example offline-tts project and replace line with audio generate with
|
If you uninstall it, will it fix the issue or not? |
absolutelly, but how it can be that by installing other library your just doesn't work. Apparently there is some dynamic binding at sherpa-onnx causing this I suppose. In my solution I need to use both libraries. |
sherpa-onnx also links to onnxruntime.dll Please search You can use sherpa-onnx's onnxruntime.dll to replace the one from Otherwise, there are conflicts between different versions of onnxruntime.dll |
Okay so I tried to replace onnxruntime at build for the one used by sherpa-onnx, I made sherpa-onnx working again but the PHI3 model using So in theory approach you proposed is dirty but valid. I saw PR for 1.18.1 onnxruntime, is there any expected date when it could be available? I believe that will solve all the issues. I understant that update your library to newest onnxruntime must be unpleasant job, but in order to maintain this awesome project it is worthy. |
We also want to update to the latest onnxruntime. However, the onnxruntime > 1.17.1 causes issues with sherpa-onnx. Please see #906 Basically, you can use onnxruntime 1.18.1 to compile sherpa-onnx from source and then use the DLL you generated to replace the one you downloaded into .Net. If you have any issues after doing this at runtime, please see microsoft/onnxruntime#20808 (comment) We have supported so many models that we have not found time to use the above code to convert existing models one by one. That is why we have not updated onnxruntime to the latest version. |
I'll try that today and let you know, thanks |
I tried to build it from your fork with onnxruntime ver 18 but I've got tons of errors while doing that I believe my env does not have right dependencies? donno, look list goes on for a long time but for simplicity I trimmed it here. I converted all models with this simple script but still could not make all of them work (some of the actually did although when I changed speed whatever different from 1 it generated extra short audio).
If you want I can update script to be able process archives as it is in https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models so it would pull onnx out convert and replace it within archive. My question to you is, since you alredy have this done, would you mind to build appropriate dlls and publish it here once you have time? my plan is to run linux64bit, osx and win64bit platforms and I already spend waay too much time on this issue my self and have to move ahead with development. Thanks and looking forward to your response. |
I managed just now to work vctk model with 109 speakers I can work with that, so if you just prepare onnx 18 of sherpa-onnx version will be good enough. I can update python script so you can automatically convert all your models to newest opset. |
So additional informations: If you want that script let me know if not you can close ticket and hopefully new version will be supported withn 1-2 months. I would really like to use all models with 6+ speakers since size to value ratio is good in there. |
The latest nuget package supports onnxruntime 1.18.0. please re-try. |
I suggest that you also try It has more than 900 speakers! |
To make absolutelly transparent how to replicate the problem please run sherpa offline-tts in 1.10.13 I tried to run model 'vits-piper-en_GB-vctk-medium' with and without conversion of the 21 opset, it changed nothing. I got error (opset 21):
I got error (opset unchanged):
How to replicate change running single generate to generate in loop like following
First run will pass the others will fail, same thing as when you generate speaker 0 and then 1 in sequence. |
Thank you for reporting it. Will look into it during the weekend. |
Allright, the tts demo works now. I appreciate effort, but I was hoping you figure out the problem, not rollback to old onnx version. So how to resolve this onnx runtime issue? Is that on the list any time soon? btw I don't believe it was ever problem with opset because I also run now another model on opset 14 (due to tf conversion bug) with onnx runtime 18.1. I really do want to go with sherpa in PROD env. Or if you have any ideas I could try, I'm eager to hear from you. I also believe that problem can be simulated when you install Microsoft.ML.OnnxRuntimeGenAI 0.3.0 to tts example project. |
Don't forget, first run always works.. so to me it looks there are some data from first run and that causes issue on reshape node... because creation of new instance make it works again. |
That is unexpected. I cannot understand it. To me the model should be stateless. |
I guess model it self yes, but I would suggest to check indempotency of c pipeline around the model. I don't know why it's happening eighter, but all traces suggest exactly that. |
temporary I resolved issue with packed console application I'm executing in separated process which has required dependencies, it works but it also adds additional size to the app package so I'm really eager to see support for onnx runtime 18.1+ |
Sorry that I have no idea how to fix it to support onnxruntime 1.18.1 |
I know, no blame dude, it's really difficult to tackle this as it makes no sense to crash when stateless. We spent already long time on this topic. btw is it possible to create more models with many speakers in other languages? could you give me some hint where to start? I built desktop app but when I want support many languages it's can get really big with single speaker models. 🤷🏼♂️ |
We support models from https://github.com/rhasspy/piper Would you be able to take a look at the doc of piper? Once you have a model from piper, it is straightforward to convert it to sherpa-onnx. |
Hello, I'm using your TTS library and must say it's very good, but I have no idea why when I instantiate OfflineTts model and run generate it returns result, but when I do it second time on the same instance I'll get error, for model I'm using this
I'm using org.k2fsa.sherpa.onnx package and tried all possible versions, also alongside I'm using as referrence within my project onnx runtime (for my other models) but that should not affect this package. My app is running on NET8, and I'm using Win11 with EU based lang.
error I'm getting on second run for any input (even the same one):
worth to notice that when I create another instance it works again for single use..
The text was updated successfully, but these errors were encountered: