Skip to content

ChatTTS example

ChatTTS example #132

Workflow file for this run

name: ChatTTS example
on:
schedule:
- cron: "0 0 * * *"
push:
paths:
- ".github/workflows/chatTTS.yml"
- "wasmedge-chatTTS/**"
pull_request:
paths:
- ".github/workflows/chatTTS.yml"
- "wasmedge-chatTTS/**"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Install Dependencies for building WasmEdge
run: |
sudo apt-get -y update
sudo apt-get -y install wget git curl software-properties-common build-essential python3 python3-dev python3-pip ninja-build
pip install chattts==0.1.1
- name: Install Rust target for wasm
run: |
rustup target add wasm32-wasi
- name: Checkout WasmEdge
uses: actions/checkout@v4
with:
repository: WasmEdge/WasmEdge
path: WasmEdge
- name: Build WasmEdge with WASI-NN ChatTTS plugin
run: |
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_USE_LLVM=OFF -DWASMEDGE_PLUGIN_WASI_NN_BACKEND=ChatTTS
cmake --build build
working-directory: WasmEdge
- name: Checkout WasmEdge-WASINN-examples
uses: actions/checkout@v4
with:
path: WasmEdge-WASINN-examples
- name: Build wasm
run: cargo build --target wasm32-wasi --release
working-directory: WasmEdge-WASINN-examples/wasmedge-chatTTS
- name: Execute
run: WASMEDGE_PLUGIN_PATH=WasmEdge/build/plugins/wasi_nn WasmEdge/build/tools/wasmedge/wasmedge --dir .:. WasmEdge-WASINN-examples/wasmedge-chatTTS/target/wasm32-wasi/release/wasmedge-chattts.wasm
- name: Verify output
run: test "$(file --brief output1.wav)" == 'RIFF (little-endian) data, WAVE audio, mono 24000 Hz'