Skip to content

LemonCANDY42/sherpa_onnx_ortv2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sherpa_onnx_ortv2

sherpa_onnx_ortv2 is a compatibility-first Flutter fork of sherpa_onnx, focused on Android/iOS ONNX Runtime unification with onnxruntime_v2.

Goals

  • Keep development and release independent from any host application repository.
  • Keep Dart API behavior aligned with upstream sherpa_onnx as much as possible.
  • Unify Android/iOS ONNX Runtime version lines for coexistence with onnxruntime_v2.
  • Provide provider=auto with deterministic priority and safe CPU fallback.

Related repositories

Repository layout

  • packages/sherpa_onnx_ortv2
  • packages/sherpa_onnx_ortv2_android
  • packages/sherpa_onnx_ortv2_ios
  • .github/workflows/verify.yml
  • .github/workflows/release.yml
  • .github/workflows/upstream-sync.yml
  • .github/workflows/upstream-monitor.yml
  • .github/workflows/native-rebuild.yml

Consume from a host app repo (submodule)

In your host repo root:

git submodule add <PUBLIC_REPO_URL> <your-submodule-path>
git submodule update --init --recursive

Then point Flutter pubspec.yaml path dependencies to: <your-submodule-path>/packages/... For example: submodules/sherpa_onnx_ortv2_repo/packages/sherpa_onnx_ortv2

For step-by-step host integration (copy-paste commands, runtime verification, and troubleshooting), see: packages/sherpa_onnx_ortv2/README_ORTV2.md

Release model

  • CI verification: verify.yml
  • Upstream sync helper: upstream-sync.yml
  • Upstream drift monitor: upstream-monitor.yml
  • Native binary rebuild automation: native-rebuild.yml
  • Release check + source artifact build: release.yml
  • Maintenance guide: MAINTENANCE.md

Version format:

  • <upstream_version>-ortv2.<n>

Native rebuild automation

native-rebuild.yml is the primary workflow for rebuilding Android/iOS native artifacts from upstream sherpa_onnx tags while pinning ONNX Runtime to the target onnxruntime_v2 line.

  • Android outputs:
    • packages/sherpa_onnx_ortv2_android/android/src/main/jniLibs/*/libsherpa-onnx-c-api.so
    • packages/sherpa_onnx_ortv2_android/android/src/main/jniLibs/*/libsherpa-onnx-cxx-api.so
  • iOS output:
    • packages/sherpa_onnx_ortv2_ios/ios/sherpa_onnx.xcframework

By default it resolves the latest upstream versions from pub.dev, rebuilds on GitHub-hosted runners, and opens a PR with the refreshed binaries and compat-matrix update.

Toolchain bootstrap

For local/native rebuild preparation:

  • Linux:
    • packages/sherpa_onnx_ortv2/tool/provision-toolchain-ubuntu.sh
  • macOS:
    • packages/sherpa_onnx_ortv2/tool/provision-toolchain-macos.sh
  • Preflight check:
    • packages/sherpa_onnx_ortv2/tool/check-native-toolchain.sh [android|ios|all]

About

Flutter sherpa-onnx fork with onnxruntime_v2 compatibility, provider auto-selection, and CI guardrails.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors