Skip to content

Commit

Permalink
fix: small fixes
Browse files Browse the repository at this point in the history
changes in readme files like fixed badges, integration test speech_to_text assertion improved. these
are internal changes, no new functionality of library
  • Loading branch information
adambezecny committed Jun 12, 2024
1 parent afa2430 commit 7def879
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cognitive-services-speech-sdk-rs"
version = "1.0.3"
version = "1.0.4"
authors = ["Adam Bezecny <[email protected]>"]
edition = "2018"
description = "Rust bindings for Microsoft Speech SDK."
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions SpeechSDK/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
);
}

Expand Down

0 comments on commit 7def879

Please sign in to comment.