From cb3b56c4a0c192659ab6c7b63fe329fe269c709b Mon Sep 17 00:00:00 2001 From: Markus Ast Date: Fri, 22 Jan 2021 17:57:55 +0100 Subject: [PATCH] fix pronunciation pronunciation of noun "wind" Refs #80 --- CHANGELOG.md | 4 ++++ crates/datis-core/src/station.rs | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d03de2e..2789416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Fixed pronunciation pronunciation of noun "wind" (from `waɪnd` to `wɪnd`) for Windows' TTS. #80 + ## [2.2.0] - 2021-01-22 The following list is a summary of changes of all previous beta releases, there were no changes since the previous beta `2.2.0-beta.7`, diff --git a/crates/datis-core/src/station.rs b/crates/datis-core/src/station.rs index 28ec284..3cab42f 100644 --- a/crates/datis-core/src/station.rs +++ b/crates/datis-core/src/station.rs @@ -272,7 +272,12 @@ impl Airfield { let wind_dir = format!("{:0>3}", weather.wind_dir.round().to_string()); report += &format!( - "Wind {} at {} knots. {}", + "{} {} at {} knots. {}", + if spoken { + r#"Wind"# + } else { + "Wind" + }, pronounce_number(wind_dir, spoken), pronounce_number((weather.wind_speed * 1.94384).round(), spoken), // to knots _break, @@ -368,8 +373,13 @@ impl Carrier { let wind_dir = format!("{:0>3}", weather.wind_dir.round().to_string()); report += &format!( - "{}'s wind {} at {} knots, {}", + r#"{}'s {} {} at {} knots, {}"#, self.name, + if spoken { + r#"wind"# + } else { + "wind" + }, pronounce_number(wind_dir, spoken), pronounce_number(weather.wind_speed.round(), spoken), _break,