[Userscript] KaniWani audio

This is a quick hack for the male voice:


var audioNode = domRoot.querySelector('audio');


var audioNode = domRoot.querySelectorAll('audio')[1];

Is there anybody out there who can help me to get this to work on Safari on a Mac please?
I get as far as seeing the ‘PLAY AUDIO’ button but only with a continuously spinning dial.

1 Like

Finally noticed your reply haha that totally works, thank you!

1 Like

This script only produces audio for the very last review in a session and none of the prior reviews.
Is anyone else seeing this or able to get audio for their other reviews?

Hi @Kumirei, as I’ve seen you in this thread and you have been so helpful recently I was just hoping you might be able to shed some light on why this is happening … or point me to the man who can (it’s my guess that is you anyway).

I haven’t used KW for years so sadly I am of no help. Maybe @crumpet could help you


Without realising I had the auto-advance delay set to zero within settings which wasn’t giving the audio a chance to play. Setting to 1s appears to be ideal (if wishing to continue using auto-advance).
All is well again.


Glad you got it sorted


Looks like there has just been an update to this script that allows you to set auto-advance delay back to zero and have this script working perfectly again without the need for a delay at all.

Certainly speeds things up.

Thanks to whoever did this, whoever you are?

1 Like

Hi! That would be me! :slight_smile:
Glad it was helpful!

1 Like

Hmm - complete noob here - How do I add the shortcut code to the script. I can edit the script but no matter how I paste it the script just won’t run until I remove what i added.

I’m trying the add the J-key shortcut


Hi, thanks for fixing the script. I reset my KaniWani and was doing some lessons after reinstalling the script but couldn’t figure out why the sound wasn’t playing. The script that’s on the The New And Improved List Of API and Third Party Apps by synecdoche doesn’t work but yours does. I hope you don’t mind but I’ve updated The New And Improved List Of API and Third Party Apps with your script.

1 Like

Thanks for doing that!

1 Like

Anyone else having problems with this script? Works fine for the first word of a review/lesson but then stops playing audio. I’m using Chrome.

UPDATE: Works fine in Edge

1 Like

I wanted to have the voice selection at random so I changed the line 243 for:

// var audioNode = domRoot.querySelector(‘audio’);
var allAudioNodes = domRoot.querySelectorAll(‘audio’);
var elem = Math.floor(Math.random() * allAudioNodes.length);
var audioNode = allAudioNodes[elem];