Skip to content

Commit 828628c

Browse files
authored
feat: full Windows platform integration (v0.5.0)
feat: full Windows platform integration (v0.5.0)
2 parents 96d5d99 + de270f1 commit 828628c

75 files changed

Lines changed: 10996 additions & 1148 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Windows Build (NSIS)
2+
3+
# Builds the Windows installer in a clean Windows 2022 runner.
4+
# This is opt-in: trigger manually via the "Run workflow" button on GitHub,
5+
# or push a tag matching `v*` to produce a release artifact.
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
sign:
11+
description: "Sign the installer (requires repo secrets to be configured)"
12+
required: false
13+
default: "false"
14+
push:
15+
tags:
16+
- "v*"
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build-nsis:
23+
name: Build & package (x86_64-pc-windows-msvc)
24+
runs-on: windows-2022
25+
timeout-minutes: 90
26+
defaults:
27+
run:
28+
shell: pwsh
29+
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
submodules: recursive
35+
36+
- name: Set up Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: "20"
40+
cache: "npm"
41+
cache-dependency-path: |
42+
desktop/package-lock.json
43+
desktop/app/package-lock.json
44+
45+
- name: Set up Rust toolchain
46+
uses: dtolnay/rust-toolchain@stable
47+
with:
48+
targets: x86_64-pc-windows-msvc
49+
50+
- name: Cache Rust build artifacts
51+
uses: Swatinem/rust-cache@v2
52+
with:
53+
workspaces: desktop/src-tauri
54+
55+
- name: Install uv
56+
uses: astral-sh/setup-uv@v3
57+
with:
58+
enable-cache: true
59+
60+
- name: Install npm dependencies
61+
working-directory: desktop
62+
run: |
63+
npm install
64+
npm --prefix app install
65+
66+
- name: Build (and optionally sign) NSIS installer
67+
env:
68+
SIGNTOOL_CERT_BASE64: ${{ secrets.SIGNTOOL_CERT_BASE64 }}
69+
SIGNTOOL_CERT_PASSWORD: ${{ secrets.SIGNTOOL_CERT_PASSWORD }}
70+
SIGNTOOL_TIMESTAMP_URL: ${{ secrets.SIGNTOOL_TIMESTAMP_URL }}
71+
run: |
72+
$shouldSign = ($env:GITHUB_EVENT_NAME -eq 'push') -or ('${{ github.event.inputs.sign }}' -eq 'true')
73+
if ($shouldSign -and $env:SIGNTOOL_CERT_BASE64) {
74+
$pfxPath = Join-Path $env:RUNNER_TEMP "voca-signing.pfx"
75+
[System.IO.File]::WriteAllBytes(
76+
$pfxPath,
77+
[System.Convert]::FromBase64String($env:SIGNTOOL_CERT_BASE64)
78+
)
79+
$env:SIGNTOOL_CERT_PATH = $pfxPath
80+
pwsh ./desktop/scripts/build-nsis-local.ps1
81+
} else {
82+
if ($shouldSign) {
83+
Write-Host "::warning ::Signing requested but SIGNTOOL_CERT_BASE64 secret is missing; building unsigned."
84+
}
85+
pwsh ./desktop/scripts/build-nsis-local.ps1 -SkipSign
86+
}
87+
88+
- name: Collect installer
89+
id: collect
90+
working-directory: desktop/src-tauri/target/release/bundle/nsis
91+
run: |
92+
$installer = Get-ChildItem -Filter "Voca_*-setup.exe" | Select-Object -First 1
93+
if (-not $installer) {
94+
Write-Error "No NSIS installer found"
95+
exit 1
96+
}
97+
"installer_path=$($installer.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
98+
"installer_name=$($installer.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
99+
100+
- name: Upload installer artifact
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: ${{ steps.collect.outputs.installer_name }}
104+
path: ${{ steps.collect.outputs.installer_path }}
105+
if-no-files-found: error
106+
retention-days: 14

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ temp/
1010
# Desktop app build artifacts
1111
desktop/node_modules/
1212
desktop/.bundle-resources/
13+
desktop/.bundle-resources-win/
1314
desktop/app/node_modules/
1415
desktop/app/dist/
1516
desktop/src-tauri/target/

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,27 @@
6464

6565
### System Requirements
6666

67-
| Item | Requirement |
68-
|------|-------------|
69-
| OS | macOS 14.0 (Sonoma) or later |
70-
| Chip | Apple Silicon (M1/M2/M3/M4) |
71-
| Disk Space | ~6 GB (app + models) |
67+
| Item | macOS | Windows |
68+
|------|-------|---------|
69+
| Version | macOS 14.0 (Sonoma) or later | Windows 10 22H2 / Windows 11 (x86_64) |
70+
| Chip | Apple Silicon (M1/M2/M3/M4) | Intel/AMD x86_64 (NVIDIA GPU optional) |
71+
| Disk Space | ~6 GB (app + models) | ~6 GB CPU build, +2.5 GB if upgrading to CUDA |
72+
| Inference Backend | MPS (Apple Silicon) by default | CPU by default; can be upgraded to CUDA on demand |
7273

7374
### Installation
7475

76+
**macOS**
77+
7578
1. Go to the [Releases](https://github.com/ZMXJJ/Voca/releases) page and download the latest `.dmg` file
7679
2. Open the DMG and drag Voca into the Applications folder
7780
3. On first launch, follow the guided setup to download models and start using the app
7881

82+
**Windows**
83+
84+
1. Go to the [Releases](https://github.com/ZMXJJ/Voca/releases) page and download the latest `Voca-x.y.z-x64-setup.exe`
85+
2. Run the installer (per-user install, no admin rights needed) and launch Voca from the Start menu
86+
3. The CPU build ships with PyTorch CPU. If an NVIDIA GPU is detected, Settings → Inference Backend offers a one-click CUDA upgrade (~2.5 GB download with resumable transfer and automatic rollback on failure)
87+
7988
> **About App Signing & Notarization**
8089
>
8190
> Voca is signed with an Apple Developer ID and has been successfully notarized by Apple, so it is safe to run on macOS.
@@ -147,7 +156,7 @@ Check for new versions in Settings. When an update is available, the app opens t
147156
- [x] **Lighter inference backend** — ASR migrated from PyTorch/FunASR to ONNX Runtime (`iic/SenseVoiceSmall-onnx`, INT8), significantly reducing app size and model download size
148157
- [ ] **Quantized model support** — INT8 and other quantized inference to lower memory and disk usage
149158
- [ ] **Richer TTS capabilities** — Support for more TTS models and expanded speech synthesis features
150-
- [ ] Windows support
159+
- [x] Windows support (x86_64, NSIS installer, optional CUDA upgrade)
151160
152161
Have ideas or suggestions? Let us know via [Issues](https://github.com/ZMXJJ/Voca/issues).
153162
@@ -163,7 +172,7 @@ Ways to get involved:
163172
164173
## Known Limitations
165174
166-
- Currently macOS (Apple Silicon) only; Windows support is planned
175+
- Runs on macOS (Apple Silicon) and Windows x86_64; Linux support is not yet planned
167176
- First launch requires an internet connection to download models (~1–2 GB); fully offline after that
168177
- Voice cloning quality depends heavily on reference audio quality — clean audio with no background noise is recommended
169178

README_zh.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,27 @@
6464

6565
### 系统要求
6666

67-
| 项目 | 要求 |
68-
|------|------|
69-
| 操作系统 | macOS 14.0 (Sonoma) 及以上 |
70-
| 芯片 | Apple Silicon (M1/M2/M3/M4) |
71-
| 磁盘空间 | 约 6 GB(应用 + 模型) |
67+
| 项目 | macOS | Windows |
68+
|------|-------|---------|
69+
| 版本 | macOS 14.0 (Sonoma) 及以上 | Windows 10 22H2 / Windows 11(x86_64) |
70+
| 芯片 | Apple Silicon (M1/M2/M3/M4) | Intel/AMD x86_64(NVIDIA GPU 可选) |
71+
| 磁盘空间 | 约 6 GB(应用 + 模型) | CPU 版约 6 GB;如升级到 CUDA 再增加约 2.5 GB |
72+
| 推理后端 | 默认 MPS(Apple Silicon) | 默认 CPU;可在设置中按需升级到 CUDA |
7273

7374
### 安装
7475

76+
**macOS**
77+
7578
1. 前往 [Releases](https://github.com/ZMXJJ/Voca/releases) 页面,下载最新版本的 `.dmg` 文件
7679
2. 打开 DMG,将 Voca 拖入「应用程序」文件夹
7780
3. 首次打开时,按照引导完成模型下载即可开始使用
7881

82+
**Windows**
83+
84+
1. 前往 [Releases](https://github.com/ZMXJJ/Voca/releases) 页面,下载最新的 `Voca-x.y.z-x64-setup.exe`
85+
2. 双击安装包(按用户安装,无需管理员权限),安装完成后从开始菜单启动 Voca
86+
3. 默认发布的是 CPU 版;若检测到 NVIDIA 显卡,可在「设置 → 推理后端」中一键升级到 CUDA(下载约 2.5 GB,支持断点续传,失败会自动回退)
87+
7988
> **关于 App 签名与公证**
8089
>
8190
> Voca 已通过 Apple Developer ID 签名,并已提交 Apple 公证(Notarization)审核通过,可在 macOS 上安全运行。
@@ -147,7 +156,7 @@ Voca 内置了完整的初始化引导流程:
147156
- [x] **更轻量的模型推理后端** — 已将 ASR 从 PyTorch/FunASR 迁移至 ONNX Runtime(`iic/SenseVoiceSmall-onnx`,INT8),大幅减少 App 体积和模型下载大小
148157
- [ ] **量化模型支持** — 引入 INT8 等量化推理,降低内存占用与磁盘空间需求
149158
- [ ] **更丰富的 TTS 功能** — 支持更多 TTS 模型和更丰富的语音合成能力
150-
- [ ] Windows 平台支持
159+
- [x] Windows 平台支持(x86_64,NSIS 安装器,可选 CUDA 升级)
151160
152161
有想法或建议?欢迎通过 [Issues](https://github.com/ZMXJJ/Voca/issues) 告诉我们。
153162
@@ -163,7 +172,7 @@ Voca 内置了完整的初始化引导流程:
163172
164173
## 已知限制
165174
166-
- 目前仅支持 macOS (Apple Silicon),Windows 支持在规划中
175+
- 当前支持 macOSApple Silicon)和 Windows x86_64;Linux 暂无支持计划
167176
- 首次启动需联网下载模型(约 1-2 GB),之后可完全离线使用
168177
- 语音克隆效果受参考音频质量影响较大,建议使用清晰、无背景噪声的音频
169178

desktop/app/package-lock.json

Lines changed: 34 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

desktop/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "voca-app",
33
"private": true,
4-
"version": "0.4.0",
4+
"version": "0.5.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

0 commit comments

Comments
 (0)