Autoplay Audio is slow

I have put this in the backlog to investigate further along with some other audio considerations. There is no timeline for when or if this might happen.
The actual solution requires balancing redundant downloaded audio with the perceived performance improvement. If what you have done works for you, that is great, but be mindful that creating a script causes issues down the road when the code changes. Your use-case while not unique, doesn’t seem to be a widespread issue.

Also just to clear up for any future reader, this comment makes reference to S3 when instead the main issue is the DNS prefetch time when connected to a VPN causes latency. The DNS prefetch is to files.wanikani.com which points to our CDN (currently cloudfront)

Thanks, that’s a great temporary workaround. I’m having the issue even without a VPN and on decently fast WiFi @tofugu-scott. It doesn’t take very long to load, but the ½ second does end up affecting my Wanikani workflow.
If this still isn’t fixed in August I’ll probably add in optional audio preloading to my Audio Tweak 4 script, as it should be easy to add in as it keeps track of questions etc already anyway (I would do it right away but unfortunately am now away from my PC for a while).

1 Like

Just wanted to put out that this is still an extremely prevalent issue for me (no VPN)

1 Like

They have put it in the backburner. Translation: they won’t fix it.

2 Likes

I don’t think there is much else that can be done because this is on WK’s backburner.
Just mail WK support if you need this looked at with priority.

1 Like

Autoplay is still slow because we aren’t prefetching the audio file while the user is typing in the answer.

I’ve had to update the brute-force pre-load everything script.
There were some changes to data that was being returned in willShowNextQuestion.

Here is what works for me.

window.addEventListener('willShowNextQuestion', (ev) => {
  console.log(ev)
  if(ev["detail"]["subject"]["readings"]) {
    for(const reading of ev["detail"]["subject"]["readings"]) {
	  const pronunciation = reading["pronunciation"];
	  for(const source of pronunciation["sources"]) {
		var audio = source["url"];
		console.log("Pre-fetching " + audio);
        fetch(audio, {mode: 'no-cors'});
      }
    }
  }
})
1 Like

It is a shame that this never got the attention. Unfortunately this still won’t work on windows 11 with either chrome or firefox, and netiher do works on linux. This topic has over 1.8k views still being searched to this day. For me, it is really annoying that the sound gets cut/late to the point I’m stop using the sound. All fixes up to now for code trying to pre-load the sounds haven’t really worked for me, maybe the code changed and broke it in the last 8 months.