跳转至

VoiceStudio — 使用 Nix / NixOS 运行与开发

该仓库包含一个社区维护的 Nix flake(flake.nix),提供开发 shell;在 Linux 上还提供一个 FHS 环境,以提供 VoiceStudio 所需的本机库。这是一种从源码构建和运行的方式;CI 未对其进行测试,发布安装程序仍然是受支持的安装路径。

前置要求

快速开始

在 NixOS 上,动态加载的 Python 包(例如 uv 安装的 PyTorch 和 WhisperX wheels)期望使用标准的 Linux 文件系统路径(/lib64、/usr/lib)。该 flake 的 FHS 环境(仅限 Linux)提供了这些路径,并让 uv 使用其自行管理的 CPython:

# Clone the repository
git clone https://github.com/debpalash/VoiceStudio.git
cd VoiceStudio

# Enter the FHS development environment
nix develop .#fhs
# or enter directly via nix run:
nix run .#fhs

# Inside the environment, install dependencies and launch the app
bun install
bun run setup:api
bun run dev

2. 标准开发 Shell(macOS 或带 nix-ld 的 Linux)

如果你正在 macOS 或已配置 nix-ld 的 Linux 上进行开发:

# Clone the repository
git clone https://github.com/debpalash/VoiceStudio.git
cd VoiceStudio

# Enter the standard development shell
nix develop

# Install dependencies and launch the app
bun install
bun run setup:api
bun run dev

nix develop shell 提供:

  • 工具链:bun、nodejs_22、uv、rustc、cargo、pkg-config。
  • 系统与多媒体库:alsa-lib、xdotool、libxtst、libx11、libxkbcommon、wayland、openssl 和 ffmpeg。
  • 为原生编译预配置了 LD_LIBRARY_PATH 和 PKG_CONFIG_PATH 钩子。

构建与测试

在任一 shell 中,你都可以编译并测试原生组件:

# Run tests for the native Rust desktop bridge
cargo test --manifest-path native/desktop-bridge/Cargo.toml

# Check types and packaging contracts
bun run check:electron

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 om/VoiceStudio