I use the AnkiDroid TTS to read the back of my cards (for language learning) and I noticed that sometimes when I call api.ankiTtsSpeak(text)
it has a small noticeable delay before it start playing.
This makes me wait for the audio to play, adding unnecessary time to my reviews.
This led me to think that it should probably be possible to “preload” the audio before I actually want it to be played (for example load it while I look at the front card and play it when I change to the back card).
This could be done for example by adding a new API api.ankiTtsCache(text)
that would load the TTS audio without playing it, and then when api.ankiTtsSpeak(text)
it could look up if the text is already in the cache to immediately play it. (The cache can be saved only per card in this case).
I would be happy to hear feedback from people who worked on TTS for AnkiDroid if this should be possible and how hard is it going to be to implement this.
Thank you!