@capacitor-community/text-to-speech 4.1.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68,14 +68,11 @@ import Capacitor
|
|
|
68
68
|
|
|
69
69
|
// Adjust rate for a closer match to other platform.
|
|
70
70
|
@objc private func adjustRate(_ rate: Float) -> Float {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return baseRate + (rate * 0.025)
|
|
77
|
-
}
|
|
78
|
-
return rate / 2
|
|
71
|
+
let baseRate: Float = AVSpeechUtteranceDefaultSpeechRate
|
|
72
|
+
if (rate >= 1.0 ) {
|
|
73
|
+
return (0.1 * rate) + (baseRate - 0.1)
|
|
74
|
+
}
|
|
75
|
+
return rate * baseRate
|
|
79
76
|
}
|
|
80
77
|
|
|
81
78
|
@objc private func resolveCurrentCall() {
|