Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ jobs:
env:
APPIMAGE_EXTRACT_AND_RUN: 1
QT_QPA_PLATFORM: offscreen
run: npm run tauri build
# `moonshine` ships the Moonshine ONNX engine alongside whisper-cpp in
# every release build (links ONNX Runtime, fetched at build time).
run: npm run tauri build -- --features moonshine

# Portable GPU AppImage. whisper.cpp's Vulkan backend links only
# libvulkan (lightweight, unlike CUDA), so linuxdeploy bundles it fine.
Expand All @@ -262,7 +264,7 @@ jobs:
env:
APPIMAGE_EXTRACT_AND_RUN: 1
QT_QPA_PLATFORM: offscreen
run: npm run tauri build -- --features vulkan
run: npm run tauri build -- --features vulkan,moonshine

# linuxdeploy bundles whatever graphics/Wayland/input libraries exist on
# the build host. On ubuntu-22.04 those are older than modern desktops, and
Expand Down Expand Up @@ -312,7 +314,7 @@ jobs:
QT_QPA_PLATFORM: offscreen
# Call tauri directly so --bundles lands before the cargo -- separator;
# `npm run tauri build -- --bundles deb` wrongly sends --bundles to cargo.
run: node_modules/.bin/tauri build --bundles deb -- --features cuda
run: node_modules/.bin/tauri build --bundles deb -- --features cuda,moonshine

# ── Tauri build (Windows) ───────────────────────────────────────────────
# NSIS (setup.exe) only — the advertised Windows installer. The WiX/MSI
Expand All @@ -321,7 +323,7 @@ jobs:
# `--bundles nsis` reaches tauri instead of cargo.
- name: Build installer (Windows, CPU)
if: runner.os == 'Windows' && !matrix.cuda
run: npx tauri build --bundles nsis
run: npx tauri build --bundles nsis -- --features moonshine

- name: Copy real CUDA DLLs (Windows, CUDA)
if: runner.os == 'Windows' && matrix.cuda
Expand All @@ -333,7 +335,7 @@ jobs:

- name: Build installer (Windows, CUDA)
if: runner.os == 'Windows' && matrix.cuda
run: npx tauri build --bundles nsis -- --features cuda
run: npx tauri build --bundles nsis -- --features cuda,moonshine

# ── Collect and rename Linux artifacts ──────────────────────────────────
# Search the whole workspace so the path is correct regardless of whether
Expand Down
49 changes: 17 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.2.8"
version = "0.3.0"
edition = "2021"
authors = ["VoxCtrl Contributors"]
license = "MIT"
Expand Down
11 changes: 7 additions & 4 deletions build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,15 @@ if [ "$CUDA_FOUND" = false ] && [ "$HAS_NVIDIA_GPU" = true ]; then
fi

info "Running Tauri release compiler with headless PATH and CUDA injection..."
# The Moonshine ONNX backend is always compiled in so both speech engines
# (whisper-cpp and Moonshine) are selectable in every AppImage. It links ONNX
# Runtime, fetched at build time, so this step needs network access.
if [ "$CUDA_FOUND" = true ]; then
info "CUDA detected. Compiling with GPU support..."
npx tauri build -- --features cuda
info "CUDA detected. Compiling with GPU support (whisper-cpp + Moonshine)..."
npx tauri build -- --features cuda,moonshine
else
info "CUDA not detected. Compiling for CPU only..."
npx tauri build
info "CUDA not detected. Compiling for CPU only (whisper-cpp + Moonshine)..."
npx tauri build -- --features moonshine
fi

ok "Compilation finished successfully."
Expand Down
23 changes: 18 additions & 5 deletions crates/voxctrl-inference/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,28 @@ cuda = ["whisper-rs/cuda"]
# CUDA's heavy runtime. Falls back to CPU when no Vulkan device is present.
vulkan = ["whisper-rs/vulkan"]

# Moonshine ONNX backend via onnxruntime
moonshine = ["dep:ort", "dep:ndarray"]
# Moonshine ONNX backend via onnxruntime. `ort` keeps its default features,
# which include `download-binaries`: ONNX Runtime is fetched at build time and
# linked into the binary, so the shipped app is self-contained and needs no
# system `libonnxruntime` at runtime (nothing else in the workspace provides
# one). Decoding uses the `tokenizers` crate with a tokenizer embedded in the
# binary (see `assets/moonshine_tokenizer.json`).
moonshine = ["dep:ort", "dep:tokenizers"]

[dependencies.ort]
version = "2.0.0-rc.12"
optional = true
features = ["download-binaries"]
# Default features include `download-binaries`, which fetches a prebuilt ONNX
# Runtime at build time and links it statically, so the resulting binary is
# self-contained (no system libonnxruntime needed at runtime). Building the
# `moonshine` feature therefore requires network access to the ONNX Runtime
# binary host at compile time. To build fully offline instead, switch to
# `default-features = false, features = ["load-dynamic", "std", "api-24"]` and
# ship a `libonnxruntime` alongside the app.

[dependencies.ndarray]
version = "0.16"
[dependencies.tokenizers]
version = "0.21"
optional = true
default-features = false
features = ["onig"]

Loading
Loading