diff --git a/Cargo.toml b/Cargo.toml index cb08133..3a4bfc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tts" -version = "0.13.1" +version = "0.14.0" authors = ["Nolan Darilek "] repository = "https://github.com/ndarilek/tts-rs" description = "High-level Text-To-Speech (TTS) interface" @@ -11,9 +11,6 @@ edition = "2018" [lib] crate-type = ["lib", "cdylib", "staticlib"] -[features] -use_tolk = ["tolk"] - [dependencies] dyn-clonable = "0.9" lazy_static = "1" diff --git a/README.md b/README.md index 90fab74..790e4f2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This library provides a high-level Text-To-Speech (TTS) interface supporting various backends. Currently supported backends are: * Windows - * Screen readers/SAPI via Tolk (requires `use_tolk` Cargo feature) + * Screen readers/SAPI via Tolk (requires `tolk` Cargo feature) * WinRT * Linux via [Speech Dispatcher](https://freebsoft.org/speechd) * MacOS/iOS diff --git a/src/backends/mod.rs b/src/backends/mod.rs index c36c233..aad23ca 100644 --- a/src/backends/mod.rs +++ b/src/backends/mod.rs @@ -1,7 +1,7 @@ #[cfg(target_os = "linux")] mod speech_dispatcher; -#[cfg(all(windows, feature = "use_tolk"))] +#[cfg(all(windows, feature = "tolk"))] mod tolk; #[cfg(windows)] @@ -22,7 +22,7 @@ mod android; #[cfg(target_os = "linux")] pub(crate) use self::speech_dispatcher::*; -#[cfg(all(windows, feature = "use_tolk"))] +#[cfg(all(windows, feature = "tolk"))] pub(crate) use self::tolk::*; #[cfg(windows)] diff --git a/src/backends/tolk.rs b/src/backends/tolk.rs index f9281f7..ae16e4f 100644 --- a/src/backends/tolk.rs +++ b/src/backends/tolk.rs @@ -1,4 +1,4 @@ -#[cfg(all(windows, feature = "use_tolk"))] +#[cfg(all(windows, feature = "tolk"))] use log::{info, trace}; use tolk::Tolk as TolkPtr; diff --git a/src/lib.rs b/src/lib.rs index a4b94f5..fa538df 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ * a Text-To-Speech (TTS) library providing high-level interfaces to a variety of backends. * Currently supported backends are: * * Windows - * * Screen readers/SAPI via Tolk (requires `use_tolk` Cargo feature) + * * Screen readers/SAPI via Tolk (requires `tolk` Cargo feature) * * WinRT * * Linux via [Speech Dispatcher](https://freebsoft.org/speechd) * * MacOS/iOS @@ -36,7 +36,7 @@ pub enum Backends { SpeechDispatcher, #[cfg(target_arch = "wasm32")] Web, - #[cfg(all(windows, feature = "use_tolk"))] + #[cfg(all(windows, feature = "tolk"))] Tolk, #[cfg(windows)] WinRT, @@ -187,7 +187,7 @@ impl TTS { let tts = backends::Web::new()?; Ok(TTS(Box::new(tts))) } - #[cfg(all(windows, feature = "use_tolk"))] + #[cfg(all(windows, feature = "tolk"))] Backends::Tolk => { let tts = backends::Tolk::new(); if let Some(tts) = tts { @@ -225,13 +225,13 @@ impl TTS { pub fn default() -> Result { #[cfg(target_os = "linux")] let tts = TTS::new(Backends::SpeechDispatcher); - #[cfg(all(windows, feature = "use_tolk"))] + #[cfg(all(windows, feature = "tolk"))] let tts = if let Ok(tts) = TTS::new(Backends::Tolk) { Ok(tts) } else { TTS::new(Backends::WinRT) }; - #[cfg(all(windows, not(feature = "use_tolk")))] + #[cfg(all(windows, not(feature = "tolk")))] let tts = TTS::new(Backends::WinRT); #[cfg(target_arch = "wasm32")] let tts = TTS::new(Backends::Web);