diff --git a/Cargo.lock b/Cargo.lock index 340f501..1daa419 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cognitive-services-speech-sdk-rs" -version = "1.0.3" +version = "1.0.4" dependencies = [ "bindgen", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index 749fa76..131668f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cognitive-services-speech-sdk-rs" -version = "1.0.3" +version = "1.0.4" authors = ["Adam Bezecny "] edition = "2018" description = "Rust bindings for Microsoft Speech SDK." @@ -12,7 +12,7 @@ exclude = [ ] repository = "https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/" #documentation = "https://jabber-tools.github.io/cognitive_services_speech_sdk_rs/doc/1.0.0/cognitive_services_speech_sdk_rs/index.html" -documentation = "https://docs.rs/jabber-tools/1.0.3" +documentation = "https://docs.rs/cognitive-services-speech-sdk-rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 4c06f69..8caa77d 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ [![License](https://img.shields.io/badge/License-Apache-blue.svg)](LICENSE-APACHE) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE-MIT) [![Crates.io][crates-badge]][crates-url] -[![rustdoc][rustdoc-badge]][rustdoc-url] +[![docs.rs][rustdoc-badge]][rustdoc-url] [![CI](https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/actions/workflows/github-actions-rust-ci.yml/badge.svg)](https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/actions/workflows/github-actions-rust-ci.yml) [crates-badge]: https://img.shields.io/crates/v/cognitive-services-speech-sdk-rs.svg [crates-url]: https://crates.io/crates/cognitive-services-speech-sdk-rs -[rustdoc-badge]: https://img.shields.io/badge/rustdoc-0.2.2-green.svg +[rustdoc-badge]: https://img.shields.io/badge/docs.rs-1.0.4-green.svg [rustdoc-url]: https://docs.rs/cognitive-services-speech-sdk-rs Rust bindings for Microsoft Cognitive Speech Services SDK. Provides thin abstraction around native C API. Heavily inspired by official [Go library](https://github.com/microsoft/cognitive-services-speech-sdk-go). Provides speech-to-text, text-to-speech and bot framework dialog management capabilities. diff --git a/SpeechSDK/README.md b/SpeechSDK/README.md index 360271b..2491f0f 100644 --- a/SpeechSDK/README.md +++ b/SpeechSDK/README.md @@ -4,13 +4,13 @@ [![License](https://img.shields.io/badge/License-Apache-blue.svg)](LICENSE-APACHE) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE-MIT) [![Crates.io][crates-badge]][crates-url] -[![rustdoc][rustdoc-badge]][rustdoc-url] +[![docs.rs][rustdoc-badge]][rustdoc-url] [![CI](https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/actions/workflows/github-actions-rust-ci.yml/badge.svg)](https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/actions/workflows/github-actions-rust-ci.yml) [crates-badge]: https://img.shields.io/crates/v/cognitive-services-speech-sdk-rs.svg [crates-url]: https://crates.io/crates/cognitive-services-speech-sdk-rs -[rustdoc-badge]: https://img.shields.io/badge/rustdoc-0.2.2-green.svg -[rustdoc-url]: https://jabber-tools.github.io/cognitive_services_speech_sdk_rs/doc/1.0.0/cognitive_services_speech_sdk_rs/index.html +[rustdoc-badge]: https://img.shields.io/badge/docs.rs-1.0.4-green.svg +[rustdoc-url]: https://docs.rs/cognitive-services-speech-sdk-rs ## Repository location diff --git a/build.rs b/build.rs index 4f8805c..bf174ef 100644 --- a/build.rs +++ b/build.rs @@ -189,6 +189,14 @@ fn main() { Command::new("unzip").args(args).status().unwrap(); } + let skip_bindgen = env::var("MS_COG_SVC_SPEECH_SKIP_BINDGEN") + .map(|v| v == "1") + .unwrap_or(false); + + if skip_bindgen { + return; + } + println!("cargo:rustc-link-search=framework={}/MicrosoftCognitiveServicesSpeech.xcframework/macos-arm64_x86_64", sdk_output_dir.display()); println!("cargo:rustc-link-lib=framework=MicrosoftCognitiveServicesSpeech"); diff --git a/changelog.md b/changelog.md index a167e7d..b71766f 100644 --- a/changelog.md +++ b/changelog.md @@ -22,4 +22,6 @@ Version 1.0.1 Implemented trait **std::error::Error** for **cognitive_services_s Version 1.0.2 Extended PropertyId with missing values -Version 1.0.3 documentation moved to docs.rs \ No newline at end of file +Version 1.0.3 documentation moved to docs.rs + +Version 1.0.4 minor fixes in readme files (badges, etc.), integration test **speech_to_text** made more resilient, assertion improved \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index db380df..5a4957b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,13 +4,13 @@ [![License](https://img.shields.io/badge/License-Apache-blue.svg)](LICENSE-APACHE) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE-MIT) [![Crates.io][crates-badge]][crates-url] -[![rustdoc][rustdoc-badge]][rustdoc-url] +[![docs.rs][rustdoc-badge]][rustdoc-url] [![CI](https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/actions/workflows/github-actions-rust-ci.yml/badge.svg)](https://github.com/jabber-tools/cognitive-services-speech-sdk-rs/actions/workflows/github-actions-rust-ci.yml) [crates-badge]: https://img.shields.io/crates/v/cognitive-services-speech-sdk-rs.svg [crates-url]: https://crates.io/crates/cognitive-services-speech-sdk-rs -[rustdoc-badge]: https://img.shields.io/badge/rustdoc-0.2.2-green.svg -[rustdoc-url]: https://jabber-tools.github.io/cognitive_services_speech_sdk_rs/doc/1.0.0/cognitive_services_speech_sdk_rs/index.html +[rustdoc-badge]: https://img.shields.io/badge/docs.rs-1.0.4-green.svg +[rustdoc-url]: https://docs.rs/cognitive-services-speech-sdk-rs ## How to build diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 753b246..70d62d1 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -60,8 +60,14 @@ async fn speech_to_text() { let result = speech_recognizer.recognize_once_async().await.unwrap(); info!("got recognition {:?}", result); assert!( - result.text.contains("By voice is my passport verify me.") - || result.text.contains("By voice is my passport verify me.") + result + .text + .to_lowercase() + .contains("y voice is my passport. verify me") + || result + .text + .to_lowercase() + .contains("y voice is my passport verify me") ); }