From b94adc59cea83d51cf30a127211de76184641774 Mon Sep 17 00:00:00 2001 From: PeterD1524 Date: Wed, 24 Jul 2024 15:59:46 +0800 Subject: [PATCH] ask users to download and install the onnx runtime Signed-off-by: PeterD1524 --- .github/workflows/piper.yml | 8 ++++++++ wasmedge-piper/README.md | 14 +++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/piper.yml b/.github/workflows/piper.yml index 5579901..2e1e9b3 100644 --- a/.github/workflows/piper.yml +++ b/.github/workflows/piper.yml @@ -21,6 +21,14 @@ jobs: sudo apt-get update sudo apt-get install ninja-build + - name: Install ONNX Runtime 1.14.1 + run: | + curl -LO https://github.com/microsoft/onnxruntime/releases/download/v1.14.1/onnxruntime-linux-x64-1.14.1.tgz + tar zxf onnxruntime-linux-x64-1.14.1.tgz + mv onnxruntime-linux-x64-1.14.1/include/* /usr/local/include/ + mv onnxruntime-linux-x64-1.14.1/lib/* /usr/local/lib/ + rm -rf onnxruntime-linux-x64-1.14.1.tgz onnxruntime-linux-x64-1.14.1 + - name: Checkout WasmEdge uses: actions/checkout@v4 with: diff --git a/wasmedge-piper/README.md b/wasmedge-piper/README.md index 1d02366..eefaaaa 100644 --- a/wasmedge-piper/README.md +++ b/wasmedge-piper/README.md @@ -13,7 +13,19 @@ Overview of WASI-NN Piper plugin dependencies: - [espeak-ng](https://github.com/rhasspy/espeak-ng): An open source speech synthesizer that supports more than hundred languages and accents. Piper uses it for text to phoneme translation. - [onnxruntime](https://github.com/microsoft/onnxruntime): A cross-platform inference and training machine-learning accelerator. [ONNX](https://onnx.ai/) is an open format built to represent machine learning models. Piper uses ONNX Runtime as an inference backend for its ONNX models to convert phoneme ids to WAV audio. -WasmEdge will download and build these dependencies automatically. +The WasmEdge WASI-NN Piper plugin relies on the ONNX Runtime C++ API. For installation instructions, please refer to the installation table on the [official website](https://onnxruntime.ai/getting-started). + +Example of installing ONNX Runtime 1.14.1 on Ubuntu: + +```bash +curl -LO https://github.com/microsoft/onnxruntime/releases/download/v1.14.1/onnxruntime-linux-x64-1.14.1.tgz +tar zxf onnxruntime-linux-x64-1.14.1.tgz +mv onnxruntime-linux-x64-1.14.1/include/* /usr/local/include/ +mv onnxruntime-linux-x64-1.14.1/lib/* /usr/local/lib/ +rm -rf onnxruntime-linux-x64-1.14.1.tgz onnxruntime-linux-x64-1.14.1 +``` + +For other dependencies, WasmEdge will download and build them automatically. Build WasmEdge from source: