Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ font8x8 = { version = "0.3", optional = true }
fontdue = { version = "0.9", optional = true }

[features]
default = ["osd"]
default = ["cuda", "local-rewrite", "osd"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep CUDA out of the default feature set

Changing default to include cuda makes every plain cargo test, cargo clippy, and cargo install whispers attempt a CUDA build. In this repo, the default-feature CI job runs cargo clippy/cargo test without installing CUDA (.github/workflows/ci.yml lines 33-36), and CUDA checks are separately gated on nvcc availability (lines 67-73), so this introduces immediate failures on non-CUDA runners and on user machines without the CUDA toolkit unless they know to override defaults.

Useful? React with 👍 / 👎.

cuda = ["whisper-rs/cuda", "llama-cpp-2?/cuda"]
local-rewrite = ["dep:llama-cpp-2"]
osd = [
Expand Down
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down Expand Up @@ -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
Expand Down
Loading