From fc67fb81742496f118dc6791fea96dc36bd013f8 Mon Sep 17 00:00:00 2001 From: Thomas Kemmer Date: Mon, 23 Mar 2026 21:15:42 +0100 Subject: [PATCH] fix(tts-advanced): use promise-based API (#5131) Co-authored-by: Daniel Kleebinder --- .../plugins/text-to-speech-advanced/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/@awesome-cordova-plugins/plugins/text-to-speech-advanced/index.ts b/src/@awesome-cordova-plugins/plugins/text-to-speech-advanced/index.ts index 4ddaffa61..e27901989 100644 --- a/src/@awesome-cordova-plugins/plugins/text-to-speech-advanced/index.ts +++ b/src/@awesome-cordova-plugins/plugins/text-to-speech-advanced/index.ts @@ -62,8 +62,7 @@ export class TextToSpeechAdvanced extends AwesomeCordovaNativePlugin { * @returns {Promise} Returns a promise that resolves when the speaking finishes */ @Cordova({ - successIndex: 1, - errorIndex: 2, + otherPromise: true }) speak(textOrOptions: string | TTSOptions): Promise { return; @@ -74,7 +73,9 @@ export class TextToSpeechAdvanced extends AwesomeCordovaNativePlugin { * * @returns {Promise} */ - @Cordova() + @Cordova({ + otherPromise: true + }) stop(): Promise { return; } @@ -84,7 +85,9 @@ export class TextToSpeechAdvanced extends AwesomeCordovaNativePlugin { * * @returns {Promise} */ - @Cordova() + @Cordova({ + otherPromise: true + }) getVoices(): Promise { return; }