From 835a2e432c73388f9c14f61e7f18de9b688a4041 Mon Sep 17 00:00:00 2001 From: Ian Wagner Date: Wed, 6 Nov 2024 00:16:23 +0900 Subject: [PATCH] Open up synthesizer property; bump version for a release (#349) --- Package.swift | 2 +- android/build.gradle | 2 +- .../Speech/SpokenInstructionObserver.swift | 20 +++++++++---------- common/Cargo.lock | 2 +- common/ferrostar/Cargo.toml | 2 +- web/package-lock.json | 4 ++-- web/package.json | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Package.swift b/Package.swift index a59132dc..4c3eb586 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ if useLocalFramework { path: "./common/target/ios/libferrostar-rs.xcframework" ) } else { - let releaseTag = "0.20.0" + let releaseTag = "0.20.1" let releaseChecksum = "7d748524c29ace95db76b03f536d4112b31950dfbeeaec89ed4a4f3e38d83adb" binaryTarget = .binaryTarget( name: "FerrostarCoreRS", diff --git a/android/build.gradle b/android/build.gradle index 5d487cef..6b82729b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -17,5 +17,5 @@ ext { allprojects { group = "com.stadiamaps.ferrostar" - version = "0.20.0" + version = "0.20.1" } diff --git a/apple/Sources/FerrostarCore/Speech/SpokenInstructionObserver.swift b/apple/Sources/FerrostarCore/Speech/SpokenInstructionObserver.swift index a4e86755..f484a244 100644 --- a/apple/Sources/FerrostarCore/Speech/SpokenInstructionObserver.swift +++ b/apple/Sources/FerrostarCore/Speech/SpokenInstructionObserver.swift @@ -7,7 +7,7 @@ import Foundation public class SpokenInstructionObserver: ObservableObject { @Published public private(set) var isMuted: Bool - private let synthesizer: SpeechSynthesizer + let synthesizer: SpeechSynthesizer private let queue = DispatchQueue(label: "ferrostar-spoken-instruction-observer", qos: .default) /// Create a spoken instruction observer with any ``SpeechSynthesizer`` @@ -28,16 +28,16 @@ public class SpokenInstructionObserver: ObservableObject { return } - let utterance: AVSpeechUtterance = if #available(iOS 16.0, *), - let ssml = instruction.ssml, - let ssmlUtterance = AVSpeechUtterance(ssmlRepresentation: ssml) - { - ssmlUtterance - } else { - AVSpeechUtterance(string: instruction.text) - } - queue.async { + let utterance: AVSpeechUtterance = if #available(iOS 16.0, *), + let ssml = instruction.ssml, + let ssmlUtterance = AVSpeechUtterance(ssmlRepresentation: ssml) + { + ssmlUtterance + } else { + AVSpeechUtterance(string: instruction.text) + } + self.synthesizer.speak(utterance) } } diff --git a/common/Cargo.lock b/common/Cargo.lock index 573f0b8c..16a54344 100644 --- a/common/Cargo.lock +++ b/common/Cargo.lock @@ -400,7 +400,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "ferrostar" -version = "0.20.0" +version = "0.20.1" dependencies = [ "assert-json-diff", "geo", diff --git a/common/ferrostar/Cargo.toml b/common/ferrostar/Cargo.toml index cbee6969..5f650c8b 100644 --- a/common/ferrostar/Cargo.toml +++ b/common/ferrostar/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "ferrostar" -version = "0.20.0" +version = "0.20.1" readme = "README.md" description = "The core of modern turn-by-turn navigation." keywords = ["navigation", "routing", "valhalla", "osrm"] diff --git a/web/package-lock.json b/web/package-lock.json index 8281fbf2..31670a54 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stadiamaps/ferrostar-webcomponents", - "version": "0.20.0", + "version": "0.20.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@stadiamaps/ferrostar-webcomponents", - "version": "0.20.0", + "version": "0.20.1", "license": "BSD-3-Clause", "dependencies": { "@stadiamaps/ferrostar": "file:../common/ferrostar/pkg", diff --git a/web/package.json b/web/package.json index c0b1b855..dd695c87 100644 --- a/web/package.json +++ b/web/package.json @@ -6,7 +6,7 @@ "CatMe0w (https://github.com/CatMe0w)", "Luke Seelenbinder " ], - "version": "0.20.0", + "version": "0.20.1", "license": "BSD-3-Clause", "type": "module", "main": "./dist/ferrostar-webcomponents.js",