Guluji
官方使用文档

Handy README

cjpais/Handy · MIT · 源码版本 f236901e

上手导读

安装与准备

下载安装包,选择识别模型和录音快捷键。

试用示例

适合边看资料边写邮件。把光标放在正文,按快捷键说一段,松开后接着编辑,可以省掉在录音软件和编辑器之间切换。

官方 READMEREADME.md

Handy

Discord

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

Handy is a cross-platform desktop application that provides simple, privacy-focused speech transcription. Press a shortcut, speak, and have your words appear in any text field. This happens on your own computer without sending any information to the cloud.

Why Handy?

Handy was created to fill the gap for a truly open source, extensible speech-to-text tool. As stated on handy.computer:

  • Free: Accessibility tooling belongs in everyone's hands, not behind a paywall
  • Open Source: Together we can build further. Extend Handy for yourself and contribute to something bigger
  • Private: Your voice stays on your computer. Get transcriptions without sending audio to the cloud
  • Simple: One tool, one job. Transcribe what you say and put it into a text box

How It Works

  1. Press a configurable keyboard shortcut: hold it to record and release to stop, or tap it to toggle recording on and off (Hold-only and Toggle-only modes are also available)
  2. Speak your words while the shortcut is active
  3. Release and Handy processes your speech using Whisper
  4. Get your transcribed text pasted directly into whatever app you're using

The process is entirely local:

  • Silence is filtered using VAD (Voice Activity Detection) with Silero
  • Transcription uses your choice of models:
    • Whisper models (Small/Medium/Turbo/Large) with GPU acceleration when available
    • Parakeet V3 - CPU-optimized model with excellent performance and automatic language detection
  • Works on Windows, macOS, and Linux

Quick Start

Installation

  1. Download the latest release from the releases page or the website
    • macOS: Also available via Homebrew cask: brew install --cask handy
    • Windows: Also available via winget: winget install cjpais.Handy
      Note: The Homebrew cask and winget package are not maintained by the Handy developers.
    • Debian/Ubuntu: Install the downloaded .deb with APT so required dependencies are installed automatically:
      sudo apt install ./Handy_*.deb
      Do not use dpkg -i unless the dependencies are already installed. If you already used it, run sudo apt --fix-broken install.
  2. Install the application
  3. Launch Handy and grant necessary system permissions (microphone, accessibility)
  4. Configure your preferred keyboard shortcuts in Settings
  5. Start transcribing!

Development Setup

For detailed build instructions including platform-specific requirements, see BUILD.md.

Sponsors

We're grateful for the support of our sponsors who help make Handy possible:

Wordcab        Epicenter        Bolt AI        Canty Digital

Integrations

Install handy Raycast Extension

Control Handy from Raycast — start/stop recording, browse transcript history, manage dictionary, switch models and languages.

Source · by @mattiacolombomc

Debug Mode

Handy includes an advanced debug mode for development and troubleshooting. Access it by pressing:

  • macOS: Cmd+Shift+D
  • Windows/Linux: Ctrl+Shift+D

CLI Parameters

Handy supports command-line flags for controlling a running instance and customizing startup behavior. These work on all platforms (macOS, Windows, Linux). Largely this is a beta feature.

Remote control flags (sent to an already-running instance via the single-instance plugin; if Handy isn't running, the toggle flags start it and begin recording):

handy --toggle-transcription    # Toggle recording on/off
handy --toggle-post-process     # Toggle recording with post-processing on/off
handy --cancel                  # Cancel the current operation

Startup flags:

handy --start-hidden            # Start without showing the main window
handy --no-tray                 # Start without the system tray icon
handy --debug                   # Enable debug mode with verbose logging
handy --help                    # Show all available flags

Flags can be combined for autostart scenarios:

handy --start-hidden --no-tray

macOS tip: When Handy is installed as an app bundle, invoke the binary directly:

/Applications/Handy.app/Contents/MacOS/Handy --toggle-transcription

Transcription hook

Advanced users on macOS and Linux can rewrite text right before Handy pastes it. Put an executable at hooks/transcription in Handy's app data folder (~/Library/Application Support/com.pais.handy/ on macOS, ~/.local/share/com.pais.handy/ on Linux). Handy writes the text to its stdin, after any LLM post-processing, and pastes its stdout. One trailing newline is removed, and empty output pastes nothing. If the hook fails or runs longer than 30 seconds, the original text is pasted.

The hook doesn't get your shell's PATH: on macOS, Handy started from the Dock or Finder only sees /usr/bin:/bin:/usr/sbin:/sbin. Use absolute paths for anything else, such as /opt/homebrew/bin/opencc.

Example that prefixes # when Terminal is the frontmost app (macOS):

mkdir -p ~/Library/Application\ Support/com.pais.handy/hooks
cd ~/Library/Application\ Support/com.pais.handy/hooks
cat > transcription << 'EOF'
#!/bin/bash
app=$(osascript -e 'tell application "System Events" to get name of first application process whose frontmost is true')
if [ "$app" = "Terminal" ]; then echo "# $(cat)"; else cat; fi
EOF
chmod +x transcription

Known Issues & Current Limitations

This project is actively being developed and has some known issues. We believe in transparency about the current state:

Bluetooth Headset Microphones (macOS)

Using a Bluetooth headset microphone on macOS may temporarily reduce playback quality or volume while recording because Bluetooth switches to bidirectional audio. Keep your headphones as the output device and select your Mac's built-in or an external microphone in Handy to avoid this.

fn and Globe Key Shortcuts (macOS)

Shortcuts that include the fn (Globe) key only work on Apple keyboards — your Mac's built-in keyboard or an Apple external keyboard. They will never trigger on a third-party keyboard, even while it is connected to the same Mac.

This is a hardware limitation rather than a Handy bug. fn is not part of the standard USB HID keyboard specification: Apple reports it through a vendor-specific usage that macOS honors only from Apple devices, while third-party keyboards handle their Fn key entirely in firmware and send nothing to the computer. There is no event for Handy to listen for.

If you switch between a MacBook keyboard and an external one, pick a shortcut built from standard modifiers (ctrl, option, shift, command) or a regular key instead.

Administrator Apps (Windows)

Windows doesn't let Handy paste into apps that are running as administrator, so Handy shows an error and the transcript is saved in History. With the Handy Keys keyboard implementation, the shortcut also won't work while an administrator app is focused. This is expected. To use Handy with these apps, run Handy as administrator too.

Linux Notes

Paste Method:

On Linux, new installs paste with Shift+Insert (Clipboard (Shift+Insert) in Advanced → Paste Method). It puts the transcript on both the clipboard and the primary selection, so the same key pastes in GUI apps (which read the clipboard) and in terminals such as kitty, Ghostty, Alacritty and GNOME Terminal (which read the primary selection), then restores both. Direct typing is still available, but it depends on your keyboard layout: it can drop capitals and accented characters or type the wrong characters on non-US layouts.

Text Input Tools:

Handy needs a tool to send the paste key (or to type, with Direct). Install the appropriate one for your display server:

Display Server Recommended Tool Install Command
X11 xdotool sudo apt install xdotool
Wayland wtype sudo apt install wtype
Both dotool sudo apt install dotool (requires input group)
  • X11: Install xdotool for both direct typing and clipboard paste shortcuts
  • Ubuntu 26.04: Has Wayland display server by default. wtype does not work, you need to install ydotool and configure systemd as described here.
  • Wayland: Install wtype (preferred) or dotool for text input to work correctly
  • dotool setup: Requires adding your user to the input group: sudo usermod -aG input $USER (then log out and back in)

Without these tools, Handy falls back to enigo which may have limited compatibility, especially on Wayland.

Wayland Support (Linux):

  • Limited support for Wayland display server
  • Requires wtype or dotool for text input to work correctly (see Linux Notes below for installation)

Other Notes:

  • Runtime library dependency (libgtk-layer-shell.so.0):

    • Handy links gtk-layer-shell on Linux. If startup fails with error while loading shared libraries: libgtk-layer-shell.so.0, install the runtime package for your distro:

      Distro Package to install Example command
      Ubuntu/Debian libgtk-layer-shell0 sudo apt install libgtk-layer-shell0
      Fedora/RHEL gtk-layer-shell sudo dnf install gtk-layer-shell
      Arch Linux gtk-layer-shell sudo pacman -S gtk-layer-shell
    • For building from source on Ubuntu/Debian, you may also need libgtk-layer-shell-dev.

  • The recording overlay is disabled by default on Linux (Overlay Position: None) because certain compositors treat it as the active window. When the overlay is visible it can steal focus, which prevents Handy from pasting back into the application that triggered transcription. If you enable the overlay anyway, be aware that clipboard-based pasting might fail or end up in the wrong window.

  • Handy picks the WebKit renderer on Linux from the linked WebKitGTK version: 2.54 and newer keep the compositor on shared memory (WEBKIT_DMABUF_RENDERER_FORCE_SHM=1), older releases disable DMA-BUF rendering (WEBKIT_DISABLE_DMABUF_RENDERER=1). Explicit values for either variable are preserved. For rendering workarounds, see Troubleshooting → Configure the WebKit renderer.

  • If Handy fails to start reliably on Linux, see Troubleshooting → Linux Startup Crashes or Instability.

  • Global keyboard shortcuts (Wayland): On Wayland, system-level shortcuts must be configured through your desktop environment or window manager. Use the CLI flags as the command for your custom shortcut.

    GNOME:

    1. Open Settings > Keyboard > Keyboard Shortcuts > Custom Shortcuts
    2. Click the + button to add a new shortcut
    3. Set the Name to Toggle Handy Transcription
    4. Set the Command to handy --toggle-transcription
    5. Click Set Shortcut and press your desired key combination (e.g., Super+O)

    KDE Plasma:

    1. Open System Settings > Shortcuts > Custom Shortcuts
    2. Click Edit > New > Global Shortcut > Command/URL
    3. Name it Toggle Handy Transcription
    4. In the Trigger tab, set your desired key combination
    5. In the Action tab, set the command to handy --toggle-transcription

    Sway / i3:

    Add to your config file (~/.config/sway/config or ~/.config/i3/config):

    bindsym $mod+o exec handy --toggle-transcription

    Hyprland:

    Add to your config file (~/.config/hypr/hyprland.conf):

    bind = $mainMod, O, exec, handy --toggle-transcription
  • You can also trigger Handy externally via Unix signals or the CLI flags, which lets Wayland window managers or other hotkey daemons keep ownership of keybindings:

    Action Trigger
    Toggle transcription pkill -USR2 -n handy or handy --toggle-transcription
    Toggle transcription with post-processing handy --toggle-post-process

    Example Sway config:

    bindsym $mod+o exec pkill -USR2 -n handy
    bindsym $mod+p exec handy --toggle-post-process

    pkill here simply delivers the signal—it does not terminate the process.

    Behavior change: older releases also accepted SIGUSR1 for toggling transcription with post-processing. WebKitGTK — the webview engine embedded in Handy on Linux — uses SIGUSR1 internally to coordinate JavaScript garbage collection, so listening for it caused phantom recordings and interrupted dictations every few minutes (#1660). Handy no longer listens for SIGUSR1 on Linux; the post-processing toggle is still available via handy --toggle-post-process. Remove any pkill -USR1 bindings: the signal is now delivered straight to WebKit's internal handler and can crash the app.

Overlay & Pasting Issues (Linux):

  • The recording overlay window can interfere with pasting transcribed text into target applications on Linux (X11)
  • Solution: Open Settings > Advanced and set "Overlay Position" to "None" to disable the overlay
  • Enable "Audio Feedback" (also in Advanced) if you still want audible confirmation of recording state
  • Users who upgrade from older versions or import settings from other platforms may need to manually apply this change

Verify Release Signatures

Handy release artifacts are signed with Tauri's updater signature format. The public key is stored in src-tauri/tauri.conf.json under plugins.updater.pubkey.

To verify a release manually, set ARTIFACT to the filename you downloaded, save the pubkey value from src-tauri/tauri.conf.json to handy.pub.b64, then decode the public key and matching .sig file from base64 and verify the artifact with minisign:

# Replace with the file you downloaded
ARTIFACT="Handy_0.8.1_amd64.AppImage"

python3 - "$ARTIFACT" <<'PY'
import base64, pathlib, sys

artifact = sys.argv[1]

pub = pathlib.Path("handy.pub.b64").read_text().strip()
pathlib.Path("handy.pub").write_bytes(base64.b64decode(pub))

sig = pathlib.Path(f"{artifact}.sig").read_text().strip()
pathlib.Path(f"{artifact}.minisig").write_bytes(base64.b64decode(sig))
PY

minisign -Vm "$ARTIFACT" \
  -p handy.pub \
  -x "$ARTIFACT.minisig"

On success, minisign prints:

Signature and comment signature verified

Do not use gpg for these .sig files.

Troubleshooting

Previous Clipboard Content Is Pasted Instead of the Transcription

If the transcription is correct in History but Handy inserts text you copied earlier, see issue #502. With the standard clipboard paste method, Handy restores your previous clipboard after a fixed delay. Under load, the receiving application may read the clipboard only after that restoration.

  1. Open Handy's settings window and press Cmd+Shift+D (macOS) or Ctrl+Shift+D (Windows/Linux) to reveal Debug.
  2. On macOS and Windows, try Reliable Paste (Beta) in Debug with a clipboard paste method selected. It uses clipboard read notifications to delay restoration instead of relying on the standard fixed delay. Test it in the application where the problem occurs; it is still experimental.
  3. If Reliable Paste is disabled or unavailable, increase Paste Delay (After) in Debug and test again. This controls the wait before restoring your previous clipboard. Paste Delay (Before) controls the wait before sending the paste keystroke and addresses a different part of the operation. These delay settings apply to the standard paste path, not Reliable Paste.

If the problem persists, add your Handy version, operating system, receiving application, paste method, Reliable Paste setting, and before/after delays to the existing issue. Redact private dictated text before sharing logs.

Manual Model Installation (For Proxy Users or Network Restrictions)

If you're behind a proxy, firewall, or in a restricted network environment where Handy cannot download models automatically, you can manually download and install them. The URLs are publicly accessible from any browser.

Step 1: Find Your App Data Directory

  1. Open Handy settings
  2. Navigate to the About section
  3. Copy the "App Data Directory" path shown there, or use the shortcuts:
    • macOS: Cmd+Shift+D to open debug menu
    • Windows/Linux: Ctrl+Shift+D to open debug menu

The typical paths are:

  • macOS: ~/Library/Application Support/com.pais.handy/
  • Windows: C:\Users\{username}\AppData\Roaming\com.pais.handy\
  • Linux: ~/.config/com.pais.handy/

Step 2: Create Models Directory

Inside your app data directory, create a models folder if it doesn't already exist:

# macOS/Linux
mkdir -p ~/Library/Application\ Support/com.pais.handy/models

# Windows (PowerShell)
New-Item -ItemType Directory -Force -Path "$env:APPDATA\com.pais.handy\models"

Step 3: Download Model Files

Download the models you want from below

Whisper Models (single .bin files):

  • Small (487 MB): https://blob.handy.computer/ggml-small.bin
  • Medium (492 MB): https://blob.handy.computer/whisper-medium-q4_1.bin
  • Turbo (1600 MB): https://blob.handy.computer/ggml-large-v3-turbo.bin
  • Large (1100 MB): https://blob.handy.computer/ggml-large-v3-q5_0.bin

Parakeet Unified EN 0.6B (single .gguf file, recommended):

  • Q8_0 (731 MB): https://huggingface.co/handy-computer/parakeet-unified-en-0.6b-gguf/resolve/main/parakeet-unified-en-0.6b-Q8_0.gguf

Step 4: Install Models

For Whisper Models (.bin files):

Simply place the .bin file directly into the models directory:

{app_data_dir}/models/
├── ggml-small.bin
├── whisper-medium-q4_1.bin
├── ggml-large-v3-turbo.bin
└── ggml-large-v3-q5_0.bin

For GGUF Models (.gguf files):

Place the .gguf file directly into the models directory, exactly like the Whisper .bin files above. Handy also picks up models already present in the shared Hugging Face cache (~/.cache/huggingface/hub), so a copy downloaded by another tool works without being moved.

Important Notes:

  • Do not rename the .bin or .gguf files—use the exact filenames from the download URLs
  • After placing the files, restart Handy to detect the new models

Step 5: Verify Installation

  1. Restart Handy
  2. Open Settings → Models
  3. Your manually installed models should now appear as "Downloaded"
  4. Select the model you want to use and test transcription

Custom Whisper Models

Handy can auto-discover custom Whisper GGML models placed in the models directory. This is useful for users who want to use fine-tuned or community models not included in the default model list.

How to use:

  1. Obtain a Whisper model in GGML .bin format (e.g., from Hugging Face)
  2. Place the .bin file in your models directory (see paths above)
  3. Restart Handy to discover the new model
  4. The model will appear in the "Custom Models" section of the Models settings page

Important:

  • Community models are user-provided and may not receive troubleshooting assistance
  • The model must be a valid Whisper GGML format (.bin file)
  • Model name is derived from the filename (e.g., my-custom-model.bin → "My Custom Model")

Linux Startup Crashes or Instability

If Handy fails to start reliably on Linux — for example, it crashes shortly after launch, never shows its window, or reports a Wayland protocol error — try the steps below in order.

1. Install (or reinstall) gtk-layer-shell

Handy uses gtk-layer-shell for its recording overlay and links against it at runtime. A missing or broken installation is the most common cause of startup failures and can manifest as a crash or a hang well before any window is shown. Make sure the runtime package is installed for your distro:

Distro Package to install Example command
Ubuntu/Debian libgtk-layer-shell0 sudo apt install libgtk-layer-shell0
Fedora/RHEL gtk-layer-shell sudo dnf install gtk-layer-shell
Arch Linux gtk-layer-shell sudo pacman -S gtk-layer-shell

If it is already installed and you still see startup problems, try reinstalling it (e.g. sudo pacman -S gtk-layer-shell again) in case the library files were corrupted by a partial upgrade.

2. Disable the GTK layer shell overlay (HANDY_NO_GTK_LAYER_SHELL)

If installing the library does not help, you can skip gtk-layer-shell initialization entirely as a workaround. On some compositors (notably KDE Plasma under Wayland) it has been reported to interact poorly with the recording overlay. With this variable set, the overlay falls back to a regular always-on-top window:

HANDY_NO_GTK_LAYER_SHELL=1 handy

3. Configure the WebKit renderer (WEBKIT_DISABLE_DMABUF_RENDERER / WEBKIT_DMABUF_RENDERER_FORCE_SHM)

Handy picks the renderer at startup from the WebKitGTK build it links, because the DMA-BUF renderer crashes on some GPU/driver combinations but the non-composited fallback loses pixels on the 2.54 series:

  • WebKitGTK 2.54 and newer: the compositor stays enabled and is forced onto shared memory with WEBKIT_DMABUF_RENDERER_FORCE_SHM=1. 2.54 composites only the damaged region of every frame, so the previous workaround (WEBKIT_DISABLE_DMABUF_RENDERER=1) left transparent windows — such as the recording overlay — showing only their animated parts (#2166).
  • Older releases: DMA-BUF rendering is disabled with WEBKIT_DISABLE_DMABUF_RENDERER=1, which can cause blank windows but matches the previous behavior.

Explicit environment-variable values are preserved, including in the Nix package:

# Force the legacy non-composited renderer (2.54: partial frames may reappear)
WEBKIT_DISABLE_DMABUF_RENDERER=1 handy

# Keep the compositor on shared memory (the 2.54 default below)
WEBKIT_DMABUF_RENDERER_FORCE_SHM=1 handy

# Let WebKit use DMA-BUF when supported (may reintroduce the GPU/driver crashes)
WEBKIT_DISABLE_DMABUF_RENDERER=0 handy

Fully quit Handy, including its tray instance, before testing a value. Running a second instance with --toggle-transcription does not change the running process's environment.

Making a workaround permanent

Set the variable in the environment of the launcher that actually starts Handy. Shell profile exports may not apply to desktop-menu or autostart launches. If you launch Handy from a .desktop file, you can prefix the Exec= line, e.g.:

Exec=env HANDY_NO_GTK_LAYER_SHELL=1 handy

Handy's built-in autostart rewrites its generated desktop entry, so editing that entry is not a durable workaround. For autostart, use an appropriate session/service environment, or disable Handy's built-in autostart and manage your own startup entry with the required variable.

If a workaround helps you, please open an issue describing your distro, desktop environment, and session type — that information helps us narrow down the underlying bug.

Empty recording overlay on Hyprland / Omarchy

If the recording overlay is empty or bordered, fully quit Handy and launch a native installation with Wayland enabled:

env -u HANDY_NO_GTK_LAYER_SHELL GDK_BACKEND=wayland handy

If this works, apply GDK_BACKEND=wayland only to Handy's launcher.

The AppImage forces GDK_BACKEND=x11 in its launch script, after your environment, so GDK_BACKEND=wayland ./Handy.AppImage has no effect. Use HANDY_GDK_BACKEND instead; Handy copies it into GDK_BACKEND before GTK starts:

HANDY_GDK_BACKEND=wayland ./Handy_x.y.z_amd64.AppImage

For a launcher, put the variable in the .desktop entry, for example Exec=env HANDY_GDK_BACKEND=wayland /path/to/Handy_x.y.z_amd64.AppImage.

Try native Wayland if the AppImage shows a frozen Language dropdown, a black window after closing to the tray and relaunching (#1729), or exits with Failed to initialize gtk backend on a Wayland-only compositor such as Niri without XWayland (#2034). The AppImage defaults to X11 because of tauri#8541, so this stays opt-in.

Vulkan Overlays and Capture Tools on Windows (HANDY_KEEP_VULKAN_IMPLICIT_LAYERS)

On Windows, Handy asks the Vulkan loader to skip implicit layers to avoid crashes caused by overlay and capture hooks (#2049). GPU acceleration remains enabled; this does not change system-wide settings.

To opt out for GPU selection or debugging tools, fully quit Handy (including the tray icon), then run both commands in the same PowerShell window:

$env:HANDY_KEEP_VULKAN_IMPLICIT_LAYERS = "1"
& "$env:ProgramFiles\Handy\handy.exe"

Adjust the executable path if needed. This override only applies to apps launched from that PowerShell session, not the Start menu. Handy also preserves any existing VK_LOADER_LAYERS_DISABLE value.

How to Contribute

  1. Check existing issues at github.com/cjpais/Handy/issues
  2. Fork the repository and create a feature branch
  3. Test thoroughly on your target platform
  4. Submit a pull request with clear description of changes
  5. Join the discussion - reach out at contact@handy.computer

The goal is to create both a useful tool and a foundation for others to build upon—a well-patterned, simple codebase that serves the community.

  • Handy CLI - The original Python command-line version
  • handy.computer - Project website with demos and documentation

License

MIT License - see LICENSE file for details.

Handy is open-source software, but the Handy name, logo, icon, and brand assets are not open-source. Unofficial forks, rewrites, and redistributions must use their own branding and must not imply endorsement or affiliation.

Acknowledgments

  • Whisper by OpenAI for the speech recognition model
  • ggml for an amazing cross-platform tensor library
  • Silero for great lightweight VAD
  • Tauri team for the excellent Rust-based app framework
  • Community contributors helping make Handy better
配套文档BUILD.md

Build Instructions

This guide covers how to set up the development environment and build Handy from source across different platforms.

Prerequisites

All Platforms

  • Rust (latest stable)
  • Bun package manager
  • Tauri Prerequisites
  • CMake (must be on PATH):
    • macOS: brew install cmake
    • Windows: winget install Kitware.CMake
    • Linux: included in the package lists below

Platform-Specific Requirements

macOS

  • Xcode Command Line Tools
  • Install with: xcode-select --install

Windows

  • Microsoft C++ Build Tools: Visual Studio 2019/2022 with C++ development tools, or Visual Studio Build Tools 2019/2022

  • Vulkan SDK from LunarG — required to build the Vulkan GPU backend (vulkan-shaders-gen needs the SDK's headers and glslc):

    winget install KhronosGroup.VulkanSDK

    Open a new terminal afterward so VULKAN_SDK is set.

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 in Troubleshooting.

Linux

  • Build essentials

  • ALSA development libraries

  • Install with:

    # Ubuntu/Debian
    sudo apt update
    sudo apt install build-essential clang libclang-dev libevdev-dev libasound2-dev pkg-config libssl-dev libvulkan-dev vulkan-tools glslc spirv-headers glslang-tools libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libgtk-layer-shell0 libgtk-layer-shell-dev patchelf cmake
    
    # Fedora/RHEL
    sudo dnf groupinstall "Development Tools"
    sudo dnf install alsa-lib-devel pkgconf openssl-devel vulkan-devel glslc \
      clang clang-devel libevdev-devel \
      spirv-headers-devel spirv-tools-devel glslang \
      gtk3-devel webkit2gtk4.1-devel libappindicator-gtk3-devel librsvg2-devel \
      gtk-layer-shell gtk-layer-shell-devel \
      cmake
    
    # Arch Linux
    sudo pacman -S base-devel clang libevdev shaderc spirv-headers glslang alsa-lib pkgconf openssl vulkan-devel \
      gtk3 webkit2gtk-4.1 libappindicator-gtk3 librsvg gtk-layer-shell \
      cmake

Setup Instructions

1. Clone the Repository

git clone git@github.com:cjpais/Handy.git
cd Handy

2. Install Dependencies

bun install

3. Start Dev Server

bun tauri dev

4. Build for Production

bun run tauri build

This compiles a release binary and generates platform-specific bundles (deb, rpm, AppImage on Linux; dmg on macOS; msi on Windows).

Linux Install (from source)

The raw binary (src-tauri/target/release/handy) cannot run standalone — it needs Tauri resource files (tray icons, sounds, VAD model) to be co-located at the expected path.

Install from the deb bundle (works on any Linux distro):

cd /tmp
ar x /path/to/Handy/src-tauri/target/release/bundle/deb/Handy_*_amd64.deb data.tar.gz
tar xzf data.tar.gz
sudo cp usr/bin/handy /usr/bin/
sudo cp -a usr/lib/. /usr/lib/
sudo cp -r usr/share/icons/hicolor/* /usr/share/icons/hicolor/
sudo cp usr/share/applications/Handy.desktop /usr/share/applications/

The runtime libraries live in the app-private /usr/lib/Handy/ (on the binary's rpath), so no ldconfig step is needed.

After subsequent rebuilds, copy the binary and any refreshed runtime libraries:

sudo cp src-tauri/target/release/handy /usr/bin/
sudo mkdir -p /usr/lib/Handy
sudo cp -a src-tauri/transcribe-libs/. /usr/lib/Handy/

Resources only need re-copying if they change upstream (new icons, sounds, models, etc.).

Troubleshooting

macOS Accessibility remains enabled after a local rebuild

Local builds use the ad-hoc signingIdentity: "-". A rebuild can have a new macOS code identity while the old System Settings > Privacy & Security > Accessibility entry remains visibly enabled, leaving Handy on Waiting....

After installing the final bundle at /Applications/Handy.app, quit Handy, clear only its stale Accessibility record, then reopen it:

osascript -e 'tell application id "com.pais.handy" to quit' || true
tccutil reset Accessibility com.pais.handy
open /Applications/Handy.app

Grant Accessibility again when prompted. This does not reset Microphone or other TCC services, and official releases normally do not need it.

For optional diagnosis, compare the designated requirements of the previous and rebuilt bundles:

codesign -dr - /path/to/previous/Handy.app 2>&1
codesign -dr - /Applications/Handy.app 2>&1

An ad-hoc requirement contains a cdhash; a changed requirement confirms the rebuild is not covered by the old grant. The reset procedure does not require this check.

See issue #1618 for the related onboarding and stale-permission report.

AppImage build fails on Arch / rolling-release distros

linuxdeploy bundles its own strip binary which is too old to process system libraries built with newer toolchains on rolling-release distros (Arch, CachyOS, Manjaro, EndeavourOS).

The error from Tauri:

Bundling Handy_*_amd64.AppImage
failed to bundle project `failed to run linuxdeploy`

Tauri swallows the real linuxdeploy error. To see it, run linuxdeploy manually:

cd src-tauri/target/release/bundle/appimage
~/.cache/tauri/linuxdeploy-x86_64.AppImage --appimage-extract-and-run \
  --appdir Handy.AppDir --plugin gtk --output appimage

Workaround: The binary, deb, and rpm bundles all build fine — only the AppImage step fails. To skip it:

bun run tauri build -- --bundles deb

Then install using the deb extraction method above.

Windows build fails with path-limit errors (MSB3491 / FTK1011 / MSB6003)

On Windows the native build can fail partway through transcribe-cpp-sys with any of these (all the same root cause):

error MSB3491: Could not write lines to file "...VCTargetsPath.tlog\VCTargetsPath.lastbuildstate".
Path: ... exceeds the OS max path limit. The fully qualified file name must be less than 260 characters.
FileTracker : error FTK1011: could not create the new file tracking log file:
...\vulkan-shaders-gen-build\...\cmTC_xxxxx.tlog\link.write.1.tlog.
The system cannot find the path specified.
error MSB6003: The specified task executable "CL.exe" could not be run.
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), 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:

# Per-shell:
$env:CARGO_TARGET_DIR = "C:\h"

# Or persist it for all future terminals (note: redirects ALL your
# Rust projects' build output, not just Handy):
[Environment]::SetEnvironmentVariable('CARGO_TARGET_DIR', 'C:\h', 'User')

Artifacts then land in C:\h\release\... instead of the repo's 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

If the build compiles all the way to Built application at: ...\handy.exe and then fails with:

Signing C:\...\handy.exe with a custom signing command
failed to bundle project `program not found`

that's the code-signing step: tauri.conf.json configures a custom signCommand (trusted-signing-cli, Azure Trusted Signing) that only exists in the release CI environment. Local development doesn't need it:

# Development (no bundling/signing at all):
bun run tauri dev

# Or compile a release binary without the installer/signing step:
bun run tauri build --no-bundle
原作者与许可证

文档来自 cjpais/Handy 的上述提交,保留原文并调整了站内排版与链接。

查看仓库许可证原文 ↗
MIT License

Copyright (c) 2025 CJ Pais

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
返回 Handy 项目分析