From 1acffbac458aba3aa2cb3952f8167b9cc9b7b940 Mon Sep 17 00:00:00 2001 From: Zero Date: Sun, 14 May 2023 14:34:53 -0600 Subject: [PATCH] update whisper-rs to 0.8.0 --- Cargo.toml | 4 ++-- src/whisper_params.rs | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 152992f..85cabd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ exclude = ["examples/full_usage"] [package] name = "whisper-rs" -version = "0.7.0" +version = "0.8.0" edition = "2021" description = "Rust bindings for whisper.cpp" license = "Unlicense" @@ -14,7 +14,7 @@ repository = "https://github.com/tazz4843/whisper-rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -whisper-rs-sys = { path = "sys", version = "0.5" } +whisper-rs-sys = { path = "sys", version = "0.6" } [dev-dependencies] hound = "3.5.0" diff --git a/src/whisper_params.rs b/src/whisper_params.rs index d875c3c..fc20722 100644 --- a/src/whisper_params.rs +++ b/src/whisper_params.rs @@ -245,6 +245,15 @@ impl<'a, 'b> FullParams<'a, 'b> { }; } + /// Set `detect_language`. + /// + /// Has the same effect as setting the language to "auto" or None. + /// + /// Defaults to false. + pub fn set_detect_language(&mut self, detect_language: bool) { + self.fp.detect_language = detect_language; + } + /// Set suppress_blank. See https://github.com/openai/whisper/blob/f82bc59f5ea234d4b97fb2860842ed38519f7e65/whisper/decoding.py#L89 /// for more information. ///