[Unsupported] [Userscript] WaniKani Review Audio Tweak (reupload/fixed)

Anyway to get the audio to play for reading questions on both correct and incorrect answers? Currently it only plays audio when a meaning question is entered in wrong, and no audio plays during any reading questions.

image

Could you give a specific example where and walk me through exactly what you want to happen in that example?

Also, did you try checking the checkbox “Autoplay on Incorrect Answer” in the “Reading Questions” part of the settings menu you screenshotted? Also, keep in mind that no audio will play for kanji (pink) or radical (blue) questions since WaniKani doesn’t have audio for those question types.

Last, what version browser are you using?

I’ve updated my version of the script to allow setting the audio playback speed in settings.

Checking the “Autoplay on incorrect” answer will get the audio to play, but only on incorrect answers. I was wanting the audio to play on correct and incorrect answers. Might just have to add a setting for that. Seems like the booleans are false by default.

image

Also I would create a Greasy Fork link for your script instead of updating a prior post.
https://greasyfork.org/en

No, by default (box unchecked) audio autoplays only on right answers. If box is checked, then it autoplays on both right and wrong answers. Is it not doing that when you check the box? What browser version are you using?

Correct, regardless of the box being checked or not. It is not autoplaying on correct answers.
Using Chrome Version 89.0.4389.82 (Official Build) (64-bit)

Is the following an accurate description of the problem you are encountering (or at least one of the problems you are encountering):

  1. Start an entirely new review session by opening a new tab that has not been used for anything before and typing in https://www.wanikani.com/review/session. Do not just go to this page in an existing tab.
  2. Refresh the page until the very first question is a reading question about a vocabulary item
  3. Answer the question correctly.
  4. Audio does not play.

Correct. I just followed those steps and this is the first review item that showed up, answered it. No audio play (unless I press “J”) on the keyboard of course.

Hm, when I do those same steps in the same browser, it works for me. (Audio plays automatically.) Can you try disabling all extensions except TamperMonkey (I assume you installed my script via TamperMonkey?) and disabling all other userscripts and try the steps again?

Also, if the audio still fails to play even when you do that, can you check the console (ctrl+shift+i) and see if there are any error messages? (Make sure to check the console after the audio should have played but before leaving the page.)

Edit: You can leave WKOF enabled too if you want (just make sure to mention whether or not you did).

But before you go to the trouble of trying to disable all other scripts, you can first go to WaniKani — Log in and make sure that “Autoplay audio in reviews” is set to “Yes” and see if that was the issue.

Didn’t even know these existed, it’s been so long since I’ve been to the settings page, lol.

That being said, during reviews audio plays according to the below:

Reading Meaning
Correct Yes Yes
Wrong Yes No

image

I was seeing if there was a way to prevent audio from playing during the “Meaning” question. If I disable the script then of course it won’t play audio on meaning questions, but also won’t play audio on wrong reading questions either.

I’ve updated the script to offer the option of not playing audio for meaning questions. If you select “none” for “Reading to Play” it should do what you want.

1 Like

Looks like this did the trick! Good work @est_fills_cando!

image

1 Like

@est_fills_cando Was using a different PC today and noticed that the script is playing the audio twice.

  • When you press enter to submit your answer the audio plays
  • When you press enter to go to the next question after seeing if the answer is correct or wrong the audio plays

My settings are the same for the script and I have not changed the WaniKani account settings.

So if I understand correctly, there is one computer where it works (only plays audio once) and another computer with the exact same settings for the script where it plays audio twice?

Are the browser versions the same on the two computers?

Is there any difference at all in the other installed scripts on the two computers?

Does the problem still happen if all other scripts except WaniKani Open Framework and Review Audio Tweak Fork are disabled?

Can you check whether all the settings at WaniKani — Log in are exactly the same when viewed on each computer? (I’m not sure whether those settings apply to your entire account or just the current pc you are using.)

Its a issue with the Double Check v2.2.14 script it seems.
All other things being equal, OS, browser, scripts, etc. I used the export / import feature of TamperMonkey to assure that the scripts remain the same across computers.

Why do you think the issue is with the DoubleCheck script when everything is the same on both computers (including, I assume, them both having the DoubleCheck script)? Are you saying that on the computer where Review Audio Tweak doesn’t work, disabling only DoubleCheck without changing anything else makes it start working again and then re-enabling DoubleCheck (again without changing anything else) causes it to no longer work?

Is the order of the scripts on both computers the same too? What are the numbers of Review Audio Tweak 2 and DoubleCheck in the order?

Edit: I’ve also updated the script with a change to try to make it load more reliably when used with DoubleCheck. Can you also try the new version and see if that fixes things? I can’t tell myself since I am still unable to reproduce the issue you are experiencing, even when I use the DoubleCheck script.

Version 1.0.8 update seems to have solved the issue. Thanks @est_fills_cando!

1 Like

New version of my fork of the script is available that supports the new audio changes WaniKani has now made.

Edit: A new version has been posted that resolves an issue of audio sometimes failing to play in Chromium based browsers caused by a recent update to Chromium.

1 Like

This script is sadly broken with the updated reviews - if anyone happened to have time to take a quick look at it it would be amazing :smiley: Having audio auto-play on meanings (if the reading has already been completed) is an amazing feature!