From a5d7e8bf5f54a0c9ffdde79f0e4e8b7f7ce9650e Mon Sep 17 00:00:00 2001 From: ayaangazali Date: Sat, 22 Aug 2026 13:06:06 -0700 Subject: [PATCH] fix(swift,web): stop pointing deprecated TTS stop helpers at a deprecated API stopSynthesis/stopSpeaking in both SDKs tell the caller to use tts.stop(), which is itself deprecated in favour of the SpeechHandle returned by speak(). Following the advice trades one deprecation warning for another, and on Swift `renamed:` gives Xcode a fix-it that performs the bad migration for you. Retarget all four at the SpeechHandle, matching the wording tts.stop() already uses. Swift drops `renamed:` for `message:` because the replacement is a returned handle, not a symbol that can be substituted at the call site. Kotlin's equivalents were fixed in #731. --- .../RunAnywhere/Public/Extensions/TTS/RunAnywhere+TTS.swift | 4 ++-- bindings/web/packages/core/src/Public/API/Deprecated.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/swift/Sources/RunAnywhere/Public/Extensions/TTS/RunAnywhere+TTS.swift b/bindings/swift/Sources/RunAnywhere/Public/Extensions/TTS/RunAnywhere+TTS.swift index 50fdd50f69..2c21b02372 100644 --- a/bindings/swift/Sources/RunAnywhere/Public/Extensions/TTS/RunAnywhere+TTS.swift +++ b/bindings/swift/Sources/RunAnywhere/Public/Extensions/TTS/RunAnywhere+TTS.swift @@ -52,7 +52,7 @@ public extension RunAnywhere { } /// Stop current TTS synthesis. - @available(*, deprecated, renamed: "tts.stop()") + @available(*, deprecated, message: "Use the SpeechHandle returned by tts.speak(_:options:) to interrupt one utterance") static func stopSynthesis() async { await CppBridge.TTS.shared.stop() } @@ -73,7 +73,7 @@ public extension RunAnywhere { } /// Stop current speech playback. - @available(*, deprecated, renamed: "tts.stop()") + @available(*, deprecated, message: "Use the SpeechHandle returned by tts.speak(_:options:) to interrupt one utterance") static func stopSpeaking() async { await stopSpeech() } diff --git a/bindings/web/packages/core/src/Public/API/Deprecated.ts b/bindings/web/packages/core/src/Public/API/Deprecated.ts index 87d5d5c83d..1f99499df4 100644 --- a/bindings/web/packages/core/src/Public/API/Deprecated.ts +++ b/bindings/web/packages/core/src/Public/API/Deprecated.ts @@ -79,12 +79,12 @@ export const deprecatedForwarders = { await tts.speak(text, options); }, - /** @deprecated Use `RunAnywhere.tts.stop()`. */ + /** @deprecated Use the `SpeechHandle` returned by `RunAnywhere.tts.speak(text, options)`. */ stopSpeaking(): void { tts.stop(); }, - /** @deprecated Use `RunAnywhere.tts.stop()`. */ + /** @deprecated Use the `SpeechHandle` returned by `RunAnywhere.tts.speak(text, options)`. */ stopSynthesis(): void { tts.stop(); },