From 794687c68d322e56ce988c3be5acbe2839cae7a8 Mon Sep 17 00:00:00 2001 From: grorge Date: Sat, 13 Jul 2024 17:06:58 +0800 Subject: [PATCH] [Docs] Add chatTTS backend Signed-off-by: grorge --- docs/contribute/source/plugin/wasi_nn.md | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/contribute/source/plugin/wasi_nn.md b/docs/contribute/source/plugin/wasi_nn.md index 1f8a115d..3668a32a 100644 --- a/docs/contribute/source/plugin/wasi_nn.md +++ b/docs/contribute/source/plugin/wasi_nn.md @@ -346,3 +346,33 @@ If the built `wasmedge` CLI tool cannot find the WASI-NN plug-in, you can set th ::: Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-NN with Piper backend plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiNN.so` after installation. + +## Build WasmEdge with WASI-NN ChatTTS Backend + +The ChatTTS backend relies on ChatTTS and Python library, we recommend the following commands to install dependencies. +```bash +sudo apt update +sudo apt upgrade +sudo apt install python3-dev +pip install chattts==0.1.1 +``` + +Then build and install WasmEdge from source: + +``` bash +cd + +cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_PLUGIN_WASI_NN_BACKEND="chatTTS" +cmake --build build + +# For the WASI-NN plugin, you should install this project. +cmake --install build +``` + + + +:::note +If the built `wasmedge` CLI tool cannot find the WASI-NN plug-in, you can set the `WASMEDGE_PLUGIN_PATH` environment variable to the plug-in installation path (such as `/usr/local/lib/wasmedge/`, or the built plug-in path `build/plugins/wasi_nn/`) to try to fix this issue. +::: + +Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-NN with ChatTTS backend plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiNN.so` after installation.