Anki 3rd party TTS service: how to stop playing audio?

One AwesomeTTS user is complaining about audio not stopping after moving to the next card: https://github.com/AwesomeTTS/awesometts-anki-addon/issues/145#issuecomment-721086798
is the handling of stop() not correct here ? https://github.com/AwesomeTTS/awesometts-anki-addon/blob/master/awesometts/ttsplayer.py#L160

Overall i’m pretty happy about the support for 3rd party TTS services in Anki, I was able to clean up a lot of AwesomeTTS code.

I’m not sure but maybe it’s because the user have not checked the checkbox Tools>Preferences>Basic>Interrupt current audio when answering.

1 Like

It seems, yes, stop() defined in SimpleProcessPlayer will never be called and audio won’t be interrupted.

Provided the audio file had already started playing, it should work - the audio file is injected into the queue, and gets played by the default player (mpv if not using the alternate version of Anki), so it should be interruptible. I seem to recall this working when the code was originally written, but perhaps something has broken, or my memory is faulty?