Play audio during meaning reviews too — Review Audio Tweak 3

Hi all.

I came across the “Review Audio Tweak” scripts (written by kobayashi, fixed by seanblue) hoping for something that would let me play audio during reviews for meaning questions. The original script was partly concerned with preventing cheating:

It will only play audio when you answer the meaning if you have already correctly answered the reading (for obvious reasons).

Total props to these guys for implementing this idea in the first place, but for whatever reason, neither of the two versions was working for me at all. In the process, I decided that this cheating-prevention was maybe part of the problem, and I wasn’t interested in preserving it anyway. So, I fiddled and simplified the script a lot, and now it does what I want.

Review Audio Tweak 3” now simply removes the distinction between reading questions and meaning questions as far as concerns the availability of the play-audio-button functionality (including keyboard shortcut J) during reviews. In short, the code says: if item has audio, then button is enabled.

Note: Obviously I didn’t make this in order to cheat. I have a whole system that works for me — using Double-Check, and also Reorder Ultimate, yet still carefully preserving most of the randomness, especially whether readings show up before meanings or vice versa — and I just find it useful sometimes to be able to immediately reinforce my practice of meaning with the correct audio (proper pitch and all; then it becomes mega-super-high-quality multi-modal: Eyes see written form; Mind pictures mneumonic scene; Hands type meaning; Mouth says reading; if I’m confident about the reading, then Finger hits J and Ears hear confirmation of reading.) Basically, know that if this script is going to be useful for you and your learning, it’s going to be because you use it honestly.

Another thing I found was that this tweak would do more harm than good if the audio were always automatically played after the meaning questions. So now, with “Tweak 3”, I keep Autoplay turned off, to be safe, and whenever I want to hear an audio clip, I hit J. Simple.

So, please use responsibly, happy learning, and let me know what you think.

Postscript to computer-savvy readers who might help further improve the code: What I actually wanted was to keep Autoplay enabled (as I had always had it before), and for the script to distinguish between meaning and reading questions in the following way:

  • if item has audio: then enable play-audio-button
    • if questionType === reading: then respect default Autoplay setting (i.e., do nothing)
    • if questionType === meaning: then override Autoplay setting with “false”

But I couldn’t get this to work. As far as I could tell, the problem had something to do with the parameter “{ autoplay: audioAutoplay }” when creating the audioElem (cp. code for Review Audio Tweak 2, line 43). That is, even when I directly pass in “{ autoplay: false }”, I couldn’t get the default Autoplay setting overridden. Thoughts? This is my first time messing with both JS and WaniKani code, btw, so it might be something obvious.


Do you have autoplay turned on in your WaniKani settings?

1 Like

Yes, I’m familiar with the autoplay setting, and update: I now have the original scripts working as advertised. I’m not sure what I was doing wrong before.

Personally, I still would rather just enable the manual play button all the time, and I still wish I could have the autoplay setting take effect only for the readings, whether the setting is turned on or off. For whatever reason, though, no matter how much I tinker, I can’t get that to work. I’m clearly not understanding something about how the variables are passed around.

So, for now, the currently posted, simplified version, which I use with autoplay turned off in settings, is the only way I can get almost all of what I want: freedom to hit the button when I want, regardless of question type or correctness, and never any autoplaying on correct meanings.

Updated for July 2019 audio update.