Skip to content
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

EchoSharp.Onnx.Sherpa breaks sherpa-onnx TTS due to different onnx runtime requirements. #10

Open
ZhenyaPav opened this issue Jan 28, 2025 · 0 comments

Comments

@ZhenyaPav
Copy link

A project with both

    <PackageReference Include="EchoSharp.Onnx.Sherpa" Version="0.1.0" />
    <PackageReference Include="org.k2fsa.sherpa.onnx" Version="*" />

As dependencies will throw this error at runtime when initializing sherpa-onnx TTS on Linux:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'sherpa-onnx-c-api' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/runtimes/linux-x64/native/sherpa-onnx-c-api.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.1/sherpa-onnx-c-api.so: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/sherpa-onnx-c-api.so: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/runtimes/linux-x64/native/libonnxruntime.so: version `VERS_1.17.1' not found (required by /home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/runtimes/linux-x64/native/libsherpa-onnx-c-api.so)
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.1/libsherpa-onnx-c-api.so: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/libsherpa-onnx-c-api.so: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/runtimes/linux-x64/native/sherpa-onnx-c-api: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.1/sherpa-onnx-c-api: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/sherpa-onnx-c-api: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/runtimes/linux-x64/native/libsherpa-onnx-c-api: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.1/libsherpa-onnx-c-api: cannot open shared object file: No such file or directory
/home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/bin/Debug/net9.0/libsherpa-onnx-c-api: cannot open shared object file: No such file or directory

   at SherpaOnnx.OfflineTts.SherpaOnnxCreateOfflineTts(OfflineTtsConfig& config)
   at SherpaOnnx.OfflineTts..ctor(OfflineTtsConfig config)
   at OfflineTtsDemo.Main(String[] args) in /home/zhenyapav/Projects/sherpa-onnx/dotnet-examples/kokoro-tts/Program.cs:line 27

This issue is only present on Linux, not Windows. Not sure if other functionality besides TTS is affected.

Steps to replicate:

  1. Download sherpa-onnx repository
  2. Go to dotnet-examples/kokoro-tts
  3. Run run-kokoro-en.sh to confirm it's working
  4. Add <PackageReference Include="EchoSharp.Onnx.Sherpa" Version="0.1.0" /> to csproj
  5. Run the shell script again

I think it could be due to EchoSharp.Onnx.Sherpa requiring Microsoft.ML.OnnxRuntime (>= 1.20.0)

Same issue in the sherpa-onnx repository: k2-fsa/sherpa-onnx#1771

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant