This is a quick hack for the male voice:
Change:
var audioNode = domRoot.querySelector('audio');
To:
var audioNode = domRoot.querySelectorAll('audio')[1];
This is a quick hack for the male voice:
Change:
var audioNode = domRoot.querySelector('audio');
To:
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.
Finally noticed your reply haha that totally works, thank you!
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?
Hi! That would be me!
Glad it was helpful!
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
Thanks!
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.
Thanks for doing that!
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
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];
I updated so it would always play regardless if you get it right or wrong.
I find that hearing it reinforces recall.
// Line 153
if (target && window.getComputedStyle(target).backgroundColor === 'rgb(127, 212, 104)' || window.getComputedStyle(target).backgroundColor === 'rgb(127, 212, 104)') {