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

Add VAD example for Dart API #996

Merged
merged 12 commits into from
Jun 14, 2024
Merged

Conversation

csukuangfj
Copy link
Collaborator

We have published the package to pub.dev.

You can find it at
https://pub.dev/packages/sherpa_onnx

The package contains pre-built libs for macOS, Linux, and Windows. So users don't need to build sherpa-onnx from source.


The example works on Linux and macOS. However, it throws the following error on Windows:

cd dart-api-examples
  cd vad
  dart run .\bin\vad.dart --silero-vad .\silero_vad.onnx --input-wav .\lei-jun-test.wav --output-wav .\lei-jun-test-no-silence.wav
  
Unhandled exception:
Invalid argument(s): Failed to load dynamic library 'D:\a\_temp\pub-cache\hosted\pub.dev\sherpa_onnx-0.0.3\lib\..\windows\sherpa-onnx-c-api.dll': The specified module could not be found.
 (error code: 126)
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:[4](https://github.com/csukuangfj/sherpa-onnx/actions/runs/9499323914/job/26179977239#step:8:4)3)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
#2      _dylib.<anonymous closure> (package:sherpa_onnx/sherpa_onnx.dart:43:29)
#3      _dylib (package:sherpa_onnx/sherpa_onnx.dart:48:2)
#4      _dylib (package:sherpa_onnx/sherpa_onnx.dart)
#[5](https://github.com/csukuangfj/sherpa-onnx/actions/runs/9499323914/job/26179977239#step:8:5)      initBindings (package:sherpa_onnx/sherpa_onnx.dart:52:27)
#6      initSherpaOnnx (file:///D:/a/sherpa-onnx/sherpa-onnx/dart-api-examples/vad/bin/vad.dart:29:15)
<asynchronous suspension>
#[7](https://github.com/csukuangfj/sherpa-onnx/actions/runs/9499323914/job/26179977239#step:8:7)      main (file:///D:/a/sherpa-onnx/sherpa-onnx/dart-api-examples/vad/bin/vad.dart:33:3)
<asynchronous suspension>

please see
https://github.com/csukuangfj/sherpa-onnx/actions/runs/9499323914/job/26179977239#step:8:1
for details.


Would be great if someone familiar with Dart can look into it.

@csukuangfj csukuangfj merged commit d08cc04 into k2-fsa:master Jun 14, 2024
54 of 67 checks passed
@csukuangfj csukuangfj deleted the dart-api-examples branch June 14, 2024 02:37
XiaYucca pushed a commit to XiaYucca/sherpa-onnx that referenced this pull request Jan 9, 2025
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

Successfully merging this pull request may close these issues.

1 participant