Skip to content
Open
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
9 changes: 7 additions & 2 deletions .github/workflows/android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ jobs:
OPENLESS_RELEASE_CHANNEL: ${{ (endsWith(github.ref_name, '-beta-tauri') || contains(github.ref_name, '-Beta.')) && 'beta' || 'stable' }}
steps:
- uses: actions/checkout@v4
# vendor/qwen-asr 仅 macOS 上 build.rs 会编译;Android APK 构建完全不需要
# 子模块,去掉递归拉取省一次网络 fetch + 失败点。
with:
# Android 不使用本地 Qwen3/Whisper C 子模块。
submodules: false

- name: Disable macOS-only Qwen3 MLX dependency
run: node openless-all/app/scripts/ci-disable-macos-qwen3.mjs


- name: Detect build mode
id: mode
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ jobs:
working-directory: openless-all/app
steps:
- uses: actions/checkout@v4
# vendor/qwen-asr 仅 macOS 上 build.rs 会编译(build.rs:49 build_qwen_asr_macos);
# Android/Linux 的 cargo check 不需要,去掉递归拉取省一次网络 fetch + 失败点。
with:
# Android 不使用任何桌面本地 ASR 子模块;macOS MLX 依赖不进入此任务。
submodules: false

# Android 不编译任何本地 ASR C 代码:build.rs 按 TARGET 解析排除
# Android triple(不调 build_qwen_asr)。qwen3-asr-rs 是 path 依赖,
# Cargo 解析器跨所有 target 都要读它的 manifest——所以由下方的
# ci-disable-macos-qwen3.mjs 删掉该依赖行,否则 cargo check 硬失败。
# 去掉递归拉取省一次网络 fetch + 失败点。
- name: Setup Android SDK + NDK
uses: android-actions/setup-android@v3
with:
Expand Down Expand Up @@ -96,6 +103,9 @@ jobs:
- name: Check Android updater pubkey matches tauri.conf.json
run: npm run check:android-updater-pubkey

- name: Disable macOS-only Qwen3 MLX dependency
run: node scripts/ci-disable-macos-qwen3.mjs

- name: Check Tauri backend (Android target)
run: cargo check --manifest-path src-tauri/Cargo.toml --target aarch64-linux-android

Expand Down Expand Up @@ -178,11 +188,17 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# vendor/qwen-asr 仅 macOS 上 build.rs 会编译(build.rs:49 build_qwen_asr_macos)。
# Windows/Linux 的 cargo check 不需要子模块;用矩阵条件避免非 macOS job
# 多拉一次 git submodule(省网络 fetch + 去掉一个失败点)。
# 只在 macOS 初始化 MLX 子模块;Linux 的 C 后端单独初始化 qwen-asr。
submodules: ${{ matrix.os == 'macos-latest' && 'recursive' || 'false' }}

- name: Initialize Linux C ASR submodule
if: runner.os == 'Linux'
shell: bash
run: git submodule update --init src-tauri/vendor/qwen-asr
- name: Disable macOS-only Qwen3 MLX dependency
if: runner.os != 'macOS'
run: node scripts/ci-disable-macos-qwen3.mjs

- uses: actions/setup-node@v4
with:
node-version: "22"
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,18 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# vendor/qwen-asr 仅 macOS 上 build.rs 会编译(build.rs:49 build_qwen_asr_macos);
# Windows/Linux 的 cargo build 不需要子模块,去掉非 macOS job 的递归拉取。
# MLX 子模块只在 macOS 发布构建需要;Linux 的 C 后端单独初始化 qwen-asr。
submodules: ${{ startsWith(matrix.platform, 'macos') && 'recursive' || 'false' }}

- name: Initialize Linux C ASR submodule
if: matrix.platform == 'ubuntu-22.04'
shell: bash
run: git submodule update --init openless-all/app/src-tauri/vendor/qwen-asr

- name: Disable macOS-only Qwen3 MLX dependency
if: ${{ !startsWith(matrix.platform, 'macos') }}
run: node openless-all/app/scripts/ci-disable-macos-qwen3.mjs

- uses: actions/setup-node@v4
with:
node-version: "22"
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "openless-all/app/src-tauri/vendor/qwen-asr"]
path = openless-all/app/src-tauri/vendor/qwen-asr
url = https://github.com/Open-Less/qwen-asr.git
[submodule "openless-all/app/src-tauri/vendor/qwen3-asr-rs"]
path = openless-all/app/src-tauri/vendor/qwen3-asr-rs
url = https://github.com/Open-Less/qwen3_asr_rs.git
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,12 @@ For the full end-user walkthrough, see [USAGE.md](USAGE.md).

## Build from source (developers)

The active codebase lives in `openless-all/app/` (Tauri 2 + Rust + React/TS). The macOS build links a vendored C ASR engine ([`Open-Less/qwen-asr`](https://github.com/Open-Less/qwen-asr), forked from `antirez/qwen-asr`) pulled in as a git submodule under `src-tauri/vendor/qwen-asr/`, so initialize submodules on first clone.
The active codebase lives in `openless-all/app/` (Tauri 2 + Rust + React/TS). The macOS build links a vendored C ASR engine ([`Open-Less/qwen-asr`](https://github.com/Open-Less/qwen-asr), forked from `antirez/qwen-asr`) pulled in as a git submodule under `src-tauri/vendor/qwen-asr/`, so initialize submodules on first clone. **Recursive submodule initialization is required on every platform** — the macOS-only `qwen3-asr-rs` path dependency is still parsed by Cargo on Windows/Linux (skipping it fails `cargo check` at resolution time), and Linux builds compile the vendored C engine too.

Rust 1.88 is the minimum supported toolchain for source builds; the latest stable Rust is recommended. CI verifies both Rust 1.88 and stable on macOS, Windows, and Linux.

On Apple Silicon, compiling the optional Qwen3-ASR MLX backend requires Xcode's MetalToolchain component. Install it with `xcodebuild -downloadComponent MetalToolchain` and verify it with `xcrun --find metal`. This is a source-build dependency; packaged OpenLess applications do not require it at runtime.

```bash
# First clone only — pull in vendored submodules
git submodule update --init --recursive
Expand Down
4 changes: 3 additions & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,12 @@ OpenLess 只做一件事:**把语音变成可用的书面文字(尤其是 AI 提

## 从源码构建(开发者)

活跃的代码库位于 `openless-all/app/`(Tauri 2 + Rust + React/TS)。macOS 构建会链接一个 vendored 的 C 语言 ASR 引擎([`Open-Less/qwen-asr`](https://github.com/Open-Less/qwen-asr),fork 自 `antirez/qwen-asr`),它作为 git 子模块位于 `src-tauri/vendor/qwen-asr/`,因此首次克隆时需初始化子模块。
活跃的代码库位于 `openless-all/app/`(Tauri 2 + Rust + React/TS)。macOS 构建会链接一个 vendored 的 C 语言 ASR 引擎([`Open-Less/qwen-asr`](https://github.com/Open-Less/qwen-asr),fork 自 `antirez/qwen-asr`),它作为 git 子模块位于 `src-tauri/vendor/qwen-asr/`,因此首次克隆时需初始化子模块。**递归初始化子模块在所有平台都是必需的**——macOS-only 的 `qwen3-asr-rs` path 依赖在 Windows/Linux 上也会被 Cargo 解析器读取(跳过它会让 `cargo check` 在解析阶段硬失败),Linux 构建还要编译 vendored C 引擎。

Rust 1.88 是从源码构建所支持的最低工具链版本;建议使用最新 stable Rust。CI 会在 macOS、Windows 和 Linux 上同时验证 Rust 1.88 与 stable。

Apple Silicon 编译可选的 Qwen3-ASR MLX 后端时需要 Xcode 的 MetalToolchain 组件。执行 `xcodebuild -downloadComponent MetalToolchain` 安装,并用 `xcrun --find metal` 验证。它只属于源码构建依赖,已打包的 OpenLess 应用运行时不需要该组件。

```bash
# 仅首次克隆——拉取 vendored 子模块
git submodule update --init --recursive
Expand Down
Loading
Loading