OSSSpeechKit icon indicating copy to clipboard operation
OSSSpeechKit copied to clipboard

Pause/Stop Functionality on Text to Speech Feature

Open sahaiderali opened this issue 3 years ago • 4 comments

I'm trying to pause/stop an ongoing reading but can't found anyway to do that. Could you please help to resolve this issue?

sahaiderali avatar Oct 26 '22 12:10 sahaiderali

Hi @sahaiderali I don't think that functionality exists currently. You could always fork or clone the repo and implement the functionality yourself with something like:

func stopSpeaking() {
    speechSynthesizer.stopSpeaking(at: .immediate)
}

Looks fairly simple to implement, I just haven't worked on this project in a while. I'll add it as a feature request for the project though.

UPDATE: Reference to the Apple docs code for stopSpeaking(at:)

AppDevGuy avatar Oct 26 '22 12:10 AppDevGuy

Thanks, Sounds Great!

sahaiderali avatar Oct 26 '22 12:10 sahaiderali

I'm going to reopen this ticket if that's ok as it's a valid feature request.

AppDevGuy avatar Oct 26 '22 12:10 AppDevGuy

Okay, Thank You.

sahaiderali avatar Oct 26 '22 12:10 sahaiderali