System.Speak on iOS - how to stop it from speaking?

I am wanting to include some text-to-speech for my mobile users. I am testing out the System.Speak built-in function. This will work, but I cannot get the system to stop speaking until it is finished. In the docs, it says there is a second parameter to allowInterrupt, but this does not seem to be available in iOS or Android

I tried including a second button to stop the speaking using the following (I used this previously in desktop when using the built-in speech synthesizer), but this has no impact, probably b/c the initial call cannot be interrupted

System.Speak("")

Any suggestions?

This is on Xojo 2024 r3, and I am looking for help in iOS and Android

If you can use iOSKit or MBS plugins you can use AVFoundation. Example iOSKit/ExampleViews/AVFoundationViews/SpeechSynthesisView.xojo_code at 4f411af8a47b9953dc85e652be2f2015cbc54a7e · kingj5/iOSKit · GitHub

Thanks for this Jason! I’ll give it a try tomorrow. I know I used iOSKit in the past but not in my current apps since it didn’t play well with Jeremie’s iOSDesignExtensions. If I use only the AVFoundation, are there any other pieces that must be included? Also, I think the last time I downloaded iOSKit, it was from 2022, maybe earlier. Is there a newer version I should use?