diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dba3f63..0d4122f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.29.0/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh | sh" - name: Cache dist uses: actions/upload-artifact@v4 with: diff --git a/.gitignore b/.gitignore index 5a53ae8..c956c35 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ bin/act Cargo.lock .idea +.DS_Store diff --git a/Cargo.toml b/Cargo.toml index d92908f..f2145af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ tokio-stream = "0.1.17" tower-http = { version = "0.5.2", features = ["trace"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -whisper-rs = "0.15.0" +whisper-rs = "0.15.1" # The profile that 'cargo dist' will build with [profile.dist] diff --git a/dist-workspace.toml b/dist-workspace.toml index 476e221..ce97c6c 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -4,7 +4,7 @@ members = ["cargo:."] # Config for 'dist' [dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.29.0" +cargo-dist-version = "0.30.3" # CI backends to support ci = "github" # The installers to generate for each app diff --git a/simple-whisper-cli/Cargo.toml b/simple-whisper-cli/Cargo.toml index e6ecd6a..e031a64 100644 --- a/simple-whisper-cli/Cargo.toml +++ b/simple-whisper-cli/Cargo.toml @@ -25,3 +25,4 @@ tokio-stream.workspace = true vulkan = ["simple-whisper/vulkan"] cuda = ["simple-whisper/cuda"] metal = ["simple-whisper/metal"] +hipblas = ["simple-whisper/hipblas"] diff --git a/simple-whisper-server/Cargo.toml b/simple-whisper-server/Cargo.toml index 52cdd07..72a041f 100644 --- a/simple-whisper-server/Cargo.toml +++ b/simple-whisper-server/Cargo.toml @@ -38,3 +38,4 @@ reqwest-websocket = "0.4.0" vulkan = ["simple-whisper/vulkan"] cuda = ["simple-whisper/cuda"] metal = ["simple-whisper/metal"] +hipblas = ["simple-whisper/hipblas"] diff --git a/simple-whisper/Cargo.toml b/simple-whisper/Cargo.toml index 7d02fea..a73c9ef 100644 --- a/simple-whisper/Cargo.toml +++ b/simple-whisper/Cargo.toml @@ -26,3 +26,4 @@ tokio-stream.workspace = true vulkan = ["whisper-rs/vulkan"] cuda = ["whisper-rs/cuda"] metal = ["whisper-rs/metal"] +hipblas = ["whisper-rs/hipblas"] diff --git a/simple-whisper/src/transcribe.rs b/simple-whisper/src/transcribe.rs index 656a0c7..717cb12 100644 --- a/simple-whisper/src/transcribe.rs +++ b/simple-whisper/src/transcribe.rs @@ -70,9 +70,17 @@ pub enum TranscribeBuilderError { } fn state_builder(model: &Path) -> Result { + #![allow(unused_mut)] let mut context_param = WhisperContextParameters::default(); - - context_param.use_gpu(true); + #[cfg(any( + feature = "metal", + feature = "vulkan", + feature = "cuda", + feature = "hipblas" + ))] + { + context_param.use_gpu(true); + } let ctx = WhisperContext::new_with_params(model.to_str().unwrap(), context_param)?;