Skip to content

Commit

Permalink
fix: default metal and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-devv committed Feb 1, 2024
1 parent ad079be commit fe11a53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion crates/whisper_cpp_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ fn main() {
config
.define("BUILD_SHARED_LIBS", "OFF")
.define("WHISPER_BUILD_EXAMPLES", "OFF")
.define("WHISPER_BUILD_TESTS", "OFF");
.define("WHISPER_BUILD_TESTS", "OFF")
.define("WHISPER_METAL", "OFF"); // TODO this is on by default on Apple devices, and is causing issues, see why

#[cfg(not(feature = "avx"))]
{
Expand Down
8 changes: 4 additions & 4 deletions crates/whisper_cpp_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ mod tests {
let model_path_str = std::env::var("WHISPER_TEST_MODEL").unwrap_or_else(|_| {
eprintln!(
"WHISPER_TEST_MODEL environment variable not set. \
Please set this to the path to a GGUF model."
Please set this to the path to a Whisper GGUF model file for the test to run."
);

std::process::exit(1)
std::process::exit(0)
});

let sample_path_str = std::env::var("WHISPER_TEST_SAMPLE").unwrap_or_else(|_| {
eprintln!(
"WHISPER_TEST_SAMPLE environment variable not set. \
Please set this to the path to a sample wav file."
Please set this to the path to a sample wav file for the test to run."
);

std::process::exit(1)
std::process::exit(0)
});

let model = WhisperModel::new_from_file(model_path_str, false)?;
Expand Down

0 comments on commit fe11a53

Please sign in to comment.