diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66032c6..98ff327 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,16 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential cmake clang pkg-config libasound2-dev + - name: Install CUDA toolkit + uses: Jimver/cuda-toolkit@v0.2.30 + with: + cuda: "12.5.0" + + - name: Expose CUDA toolkit paths + run: | + echo "CUDAToolkit_ROOT=$CUDA_PATH" >> "$GITHUB_ENV" + sudo ln -sfn "$CUDA_PATH" /usr/local/cuda + - name: Cache cargo uses: Swatinem/rust-cache@v2 @@ -49,6 +59,16 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential cmake clang pkg-config libasound2-dev + - name: Install CUDA toolkit + uses: Jimver/cuda-toolkit@v0.2.30 + with: + cuda: "12.5.0" + + - name: Expose CUDA toolkit paths + run: | + echo "CUDAToolkit_ROOT=$CUDA_PATH" >> "$GITHUB_ENV" + sudo ln -sfn "$CUDA_PATH" /usr/local/cuda + - name: Cache cargo uses: Swatinem/rust-cache@v2 diff --git a/Cargo.toml b/Cargo.toml index 3df316e..7eb5038 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ font8x8 = { version = "0.3", optional = true } fontdue = { version = "0.9", optional = true } [features] -default = ["osd"] +default = ["cuda", "local-rewrite", "osd"] cuda = ["whisper-rs/cuda", "llama-cpp-2?/cuda"] local-rewrite = ["dep:llama-cpp-2"] osd = [ diff --git a/README.md b/README.md index a6c65c0..adb97fd 100644 --- a/README.md +++ b/README.md @@ -7,26 +7,23 @@ Fast speech-to-text dictation for Wayland. ## Install ```sh -# default install +# default install: CUDA + local rewrite + OSD cargo install whispers -# CUDA -cargo install whispers --features cuda - -# local rewrite support -cargo install whispers --features local-rewrite +# no OSD +cargo install whispers --no-default-features --features cuda,local-rewrite -# CUDA + local rewrite -cargo install whispers --features cuda,local-rewrite +# no local rewrite +cargo install whispers --no-default-features --features cuda,osd -# no OSD -cargo install whispers --no-default-features +# CPU-only +cargo install whispers --no-default-features --features local-rewrite,osd ``` If you want the latest GitHub version instead of crates.io: ```sh -cargo install --git https://github.com/OneNoted/whispers --features cuda,local-rewrite +cargo install --git https://github.com/OneNoted/whispers ``` ## Requirements @@ -35,7 +32,7 @@ cargo install --git https://github.com/OneNoted/whispers --features cuda,local-r - `wl-copy` - access to `/dev/uinput` - Rust 1.85+ -- CUDA toolkit if you enable the `cuda` feature +- CUDA toolkit for the default install; opt out with `--no-default-features` if you need a CPU-only build If `/dev/uinput` is blocked, add your user to the `input` group and log back in: @@ -111,8 +108,8 @@ whispers completions zsh ## Notes - Local ASR is the default. -- Local rewrite is installed automatically with `--features local-rewrite`. -- `whispers` installs the helper rewrite worker for you when that feature is enabled. +- The default install includes CUDA, local rewrite, and the OSD helper. +- `whispers` installs the helper rewrite worker for you when `local-rewrite` is enabled. - Shell completions are printed to `stdout`. ## Troubleshooting