Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

transcribe 0.1.3 (#1664)

CJ Paisc912c6baaeef
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a4f2fd51..84c3810f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -57,6 +57,12 @@ jobs:
contents: write
runs-on: ${{ inputs.platform }}
steps:
+ # Kept for git checkout and general tooling headroom. The native
+ # transcribe-cpp-sys build no longer needs path help: since 0.1.3 its
+ # build.rs self-mitigates MAX_PATH by compiling through a short NTFS
+ # junction (and ggml's Vulkan shader-gen ExternalProject is flattened),
+ # so no CARGO_TARGET_DIR redirect is required — upstream CI proves the
+ # deep-path build with long paths forced OFF.
- name: Enable long paths (Windows)
if: runner.os == 'Windows'
shell: pwsh
@@ -248,17 +254,6 @@ jobs:
fi
echo "platform=${patched_platform}" >> $GITHUB_OUTPUT
- # transcribe-cpp-sys cmake builds create paths that exceed Windows MAX_PATH
- # (260 chars). Shorten the target dir to keep paths under the limit.
- - name: Shorten build path (Windows)
- if: runner.os == 'Windows'
- shell: pwsh
- run: |
- $drive = Split-Path -Qualifier $env:GITHUB_WORKSPACE
- $targetDir = "$drive\t"
- New-Item -ItemType Directory -Force -Path $targetDir | Out-Null
- echo "CARGO_TARGET_DIR=$targetDir" >> $env:GITHUB_ENV
-
# ggml refuses to build its ARM CPU backend under MSVC (upstream check in
# ggml/src/ggml-cpu/CMakeLists.txt: "MSVC is not supported for ARM, use
# clang"), so the Windows-ARM build must use clang-cl. transcribe-cpp-sys
@@ -736,14 +731,6 @@ jobs:
src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/rpm/*.rpm
retention-days: 30
- - name: Resolve Windows bundle path
- if: contains(inputs.platform, 'windows')
- id: win-bundle-path
- shell: pwsh
- run: |
- $base = if ($env:CARGO_TARGET_DIR) { $env:CARGO_TARGET_DIR } else { "src-tauri/target" }
- echo "base=$base" >> $env:GITHUB_OUTPUT
-
# Run on Windows releases too; upload-artifacts only controls retention.
- name: Audit Windows package runtime contents
if: contains(inputs.platform, 'windows')
@@ -751,7 +738,7 @@ jobs:
run: |
$profile = "${{ steps.build-profile.outputs.profile }}"
$target = "${{ inputs.target }}"
- $base = "${{ steps.win-bundle-path.outputs.base }}"
+ $base = "src-tauri/target"
if ($target -and $target -ne "x86_64-pc-windows-msvc") {
$bundleBase = Join-Path $base (Join-Path $target (Join-Path $profile "bundle"))
} else {
@@ -846,6 +833,6 @@ jobs:
with:
name: ${{ inputs.asset-prefix }}-${{ inputs.target }}
path: |
- ${{ steps.win-bundle-path.outputs.base }}/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/msi/*.msi
- ${{ steps.win-bundle-path.outputs.base }}/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/nsis/*.exe
+ src-tauri/target/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/msi/*.msi
+ src-tauri/target/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/nsis/*.exe
retention-days: 30
diff --git a/BUILD.md b/BUILD.md
index dd8bb539..f1bb8056 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -52,13 +52,14 @@ ORT_LIB_LOCATION=$(brew --prefix onnxruntime)/lib ORT_PREFER_DYNAMIC_LINK=1 bun
Open a new terminal afterward so `VULKAN_SDK` is set.
-> [!IMPORTANT]
-> Windows' 260-character path limit **will** break the native Vulkan build in
-> most checkouts (the shader generator nests very deep). Before your first
-> build, do BOTH steps in
+> [!NOTE]
+> Windows' 260-character path limit used to break the native Vulkan build in
+> most checkouts. Since `transcribe-cpp` 0.1.3 the build works around it
+> automatically (it compiles through a short NTFS junction — no admin rights
+> or setup needed), so a normal checkout just builds. If you still hit
+> path-limit errors, see
> [Windows build fails with path-limit errors](#windows-build-fails-with-path-limit-errors-msb3491--ftk1011--msb6003)
-> in Troubleshooting — enable long paths **and** set a short
-> `CARGO_TARGET_DIR`. Neither alone is sufficient.
+> in Troubleshooting.
#### Linux
@@ -193,28 +194,22 @@ System.IO.DirectoryNotFoundException: Could not find a part of the path ...
```
This is **not** a code or toolchain problem — it's Windows' legacy 260-character
-path limit (`MAX_PATH`). The Vulkan shader generator builds as a nested CMake
-sub-project (`...\vulkan-shaders-gen-prefix\src\vulkan-shaders-gen-build\...`),
-which alone adds ~140 characters on top of Cargo's already-deep
-`target\release\build\<crate>-<hash>\out\build\...` directory. If your checkout
-isn't very shallow, the build overflows the limit. (CI doesn't hit this because
-it builds from a short root such as `D:\a\Handy`.)
-
-**You need BOTH of the following fixes.** Different parts of the toolchain hit
-the limit in different ways: MSBuild's native `FileTracker` (`tracker.exe`)
-ignores the long-paths flag entirely, so a short target dir is required for it —
-while other .NET-side path operations overflow even from a short root unless
-long paths are enabled. Each fix alone still fails.
-
-**1. Enable Windows long paths** (one-time, machine-wide; needs an
-Administrator PowerShell):
-
-```powershell
-Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Value 1 -Type DWord
-git config --global core.longpaths true
-```
-
-**2. Build with a short target directory:**
+path limit (`MAX_PATH`), overflowed by the Vulkan shader generator's nested
+CMake build tree on top of Cargo's already-deep
+`target\release\build\<crate>-<hash>\out\build\...` directory.
+
+Since `transcribe-cpp` 0.1.3 this is mitigated automatically: the native build
+compiles through a short NTFS junction under `%LOCALAPPDATA%\tcs` (created
+without admin rights), so a normal checkout builds with no setup. Enabling
+Windows long paths does **not** reliably help here — MSBuild's native
+`FileTracker` (`tracker.exe`) ignores the long-paths flag — which is why the
+junction, not the registry flag, is the fix.
+
+If you still see the errors above, junction creation was likely blocked
+(filesystem or corporate policy) — the failing build's log then contains a
+`transcribe-cpp-sys: could not create short build junction ...` warning — or
+your checkout is deep enough to overflow even the shortened layout. Work
+around either case with a short Cargo target directory:
```powershell
# Per-shell:
@@ -226,11 +221,9 @@ $env:CARGO_TARGET_DIR = "C:\h"
```
Artifacts then land in `C:\h\release\...` instead of the repo's
-`src-tauri\target\`.
-
-Open a **new terminal** afterward — both the registry flag and the persisted
-environment variable are only picked up by freshly started processes. Then
-`bun run tauri dev` and `bun run tauri build` work normally.
+`src-tauri\target\`. Open a **new terminal** if you persisted the variable —
+it is only picked up by freshly started processes. Then `bun run tauri dev`
+and `bun run tauri build` work normally.
### Windows `tauri build` fails at bundling with `program not found`
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index f71c87fe..d90f6f1c 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -6964,9 +6964,9 @@ dependencies = [
[[package]]
name = "transcribe-cpp"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d77cafeaa8818547b7d52755e061aee75fff6d2b118085e0bf52802ec88f333"
+checksum = "4c3c4d6136eeccf56cfe8a6669e2d63770d1ef051c7cafd2cb9226218c66cded"
dependencies = [
"log",
"thiserror 2.0.18",
@@ -6975,9 +6975,9 @@ dependencies = [
[[package]]
name = "transcribe-cpp-sys"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4df6436154f7b8c5212b959dda97af90b60100388bab4cb378acf7a8ca560211"
+checksum = "278fd6a6da4d9d8d5f2716bd6761a76ea55c129fda6ba57856b80249a8570ed4"
dependencies = [
"cmake",
"serde_json",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index ab560567..1dcc3dde 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -73,7 +73,7 @@ sha2 = "0.10"
# transcribe-rs is now ONNX-only (Parakeet, Moonshine, SenseVoice, GigaAM,
# Canary, Cohere). Per-platform backend features are added in the target tables.
transcribe-rs = { version = "0.3.8", features = ["onnx"] }
-transcribe-cpp = { version = "0.1.2", default-features = false }
+transcribe-cpp = { version = "0.1.3", default-features = false }
handy-keys = "0.3.0"
ferrous-opencc = "0.2.3"
clap = { version = "4", features = ["derive"] }
@@ -126,22 +126,22 @@ winreg = "0.55"
# signtool verify entirely. CI pins -DGGML_NATIVE=OFF (see build.yml) so the
# static build targets a portable ARM baseline, not the build runner's CPU.
[target.'cfg(all(windows, target_arch = "x86_64"))'.dependencies]
-transcribe-cpp = { version = "0.1.2", default-features = false, features = [
+transcribe-cpp = { version = "0.1.3", default-features = false, features = [
"dynamic-backends",
"vulkan",
] }
[target.'cfg(all(windows, target_arch = "aarch64"))'.dependencies]
-transcribe-cpp = { version = "0.1.2", default-features = false }
+transcribe-cpp = { version = "0.1.3", default-features = false }
[target.'cfg(target_os = "macos")'.dependencies]
tauri-nspanel = { git = "https://github.com/ahkohd/tauri-nspanel", branch = "v2.1" }
-transcribe-cpp = { version = "0.1.2", default-features = false, features = ["metal"] }
+transcribe-cpp = { version = "0.1.3", default-features = false, features = ["metal"] }
[target.'cfg(target_os = "linux")'.dependencies]
gtk-layer-shell = { version = "0.8", features = ["v0_6"] }
gtk = "0.18"
-transcribe-cpp = { version = "0.1.2", default-features = false, features = [
+transcribe-cpp = { version = "0.1.3", default-features = false, features = [
"dynamic-backends",
"vulkan",
] }