# \[Userscript\] KaniWani audio

**URL:** <https://community.wanikani.com/t/userscript-kaniwani-audio/19314>\
**Category:** API And Third-Party Apps\
**Created:** [August 12, 2017, 1:54pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314 "2017-08-12T13:54:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [August 12, 2017, 1:54pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/1 "2017-08-12T13:54:08Z")

</div>

An extension for an extension! Plays the audio when you get a KaniWani review item right, to help reinforce the connection between the thing you just typed in and actual sounds.

No settings, no frills. As with any userscript, you will need to be using [Tampermonkey](http://tampermonkey.net/) on Chrome or Safari, or [Greasemonkey](http://www.greasespot.net/) on Firefox. Then just install the script from [https://github.com/stephend/kaniwani-audio/raw/master/kaniwani\_audio.user.js](https://github.com/stephend/kaniwani-audio/raw/master/kaniwani_audio.user.js).

Some ad-blocking or other extensions may conflict with this, e.g. Privacy Badger and Disable HTML5 Autoplay, so if you have issues, try disabling those extensions for \*.kaniwani.com.

TODO (if anyone is interested): interface to mute/unmute/stop playback/replay

---

<div class="post-metadata">

**Author:** ![Asperon](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/asperon/32/62488_2.png) [@Asperon](https://community.wanikani.com/u/Asperon)\
**Post date:** [August 12, 2017, 2:09pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/3 "2017-08-12T14:09:19Z")

</div>

So not for phones then. Other than scripts, are there any other limitations using the app may have?

---

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [August 12, 2017, 2:11pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/4 "2017-08-12T14:11:57Z")

</div>

I’ve only tested it on Chrome on Windows, although it should work on Chrome on any OS. It won’t be possible to get it to work on phones as far I know.

What do you mean by limitations?

---

<div class="post-metadata">

**Author:** ![Asperon](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/asperon/32/62488_2.png) [@Asperon](https://community.wanikani.com/u/Asperon)\
**Post date:** [August 12, 2017, 2:36pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/5 "2017-08-12T14:36:11Z")

</div>

Sometimes apps have fewer features than the websites, that’s all.

Thanks for the script!

---

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [August 12, 2017, 2:39pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/6 "2017-08-12T14:39:45Z")

</div>

Yeah, no phone app at all unfortunately.

---

<div class="post-metadata">

**Author:** ![chrispthompson](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/chrispthompson/32/5707_2.png) [@chrispthompson](https://community.wanikani.com/u/chrispthompson)\
**Post date:** [August 12, 2017, 2:56pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/7 "2017-08-12T14:56:13Z")

</div>

works great on safari with tampermonkey. thank you!

---

<div class="post-metadata">

**Author:** ![jprspereira](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/jprspereira/32/389740_2.png) [@jprspereira](https://community.wanikani.com/u/jprspereira)\
**Post date:** [August 12, 2017, 4:59pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/8 "2017-08-12T16:59:42Z")

</div>

Already did 100 reviews with it! 🙂 Seems like everything is working perfectly! ^^ Thanks for this!

Using windows chrome.

---

<div class="post-metadata">

**Author:** ![ryan-gustafson](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/ryan-gustafson/32/60666_2.png) [@ryan-gustafson](https://community.wanikani.com/u/ryan-gustafson)\
**Post date:** [August 12, 2017, 9:53pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/9 "2017-08-12T21:53:55Z")

</div>

Maybe I’m doing something wrong, the script shows active, but doesn’t play the audio. I have a few Chrome extenions installed (adblock, html5 autoplay disable, yomichan), as well as customized Kaniwani settings, I’ll experiment during upcoming reviews to if any of those are interacting with it. Using Windows 10.

EDIT: Appears to be the HTML5 autoplay disabling extension, I disabled on Kaniwani. Appears I forgot I had done that already on Wanakani too.

---

<div class="post-metadata">

**Author:** ![alexbeldan](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/alexbeldan/32/63446_2.png) [@alexbeldan](https://community.wanikani.com/u/alexbeldan)\
**Post date:** [August 13, 2017, 7:06am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/10 "2017-08-13T07:06:18Z")

</div>

Firefox for Android can do userscripts. 😉

---

<div class="post-metadata">

**Author:** ![Snugwugs](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/snugwugs/32/8251_2.png) [@Snugwugs](https://community.wanikani.com/u/Snugwugs)\
**Post date:** [August 13, 2017, 7:22am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/11 "2017-08-13T07:22:05Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [August 13, 2017, 8:31am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/12 "2017-08-13T08:31:35Z")

</div>

Oh, cool! Does the script work there, then?

---

<div class="post-metadata">

**Author:** ![alexbeldan](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/alexbeldan/32/63446_2.png) [@alexbeldan](https://community.wanikani.com/u/alexbeldan)\
**Post date:** [August 14, 2017, 2:05am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/13 "2017-08-14T02:05:32Z")

</div>

I didn’t try. But every other script I have installed has worked.

---

<div class="post-metadata">

**Author:** ![kybee](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/kybee/32/64269_2.png) [@kybee](https://community.wanikani.com/u/kybee)\
**Post date:** [August 29, 2017, 4:10pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/14 "2017-08-29T16:10:37Z")

</div>

This is such a great idea (!!), but the audio doesn’t seem to be playing anymore. I’m using Chrome, I have Adblock & any other extensions that would interfere disabled.

Is anyone else having this issue?

---

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [August 31, 2017, 5:35am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/15 "2017-08-31T05:35:35Z")

</div>

Thanks!

So, it was working before but now it isn’t? Does the audio play correctly if you go to the vocab item’s WaniKani page and play it there?

---

<div class="post-metadata">

**Author:** ![kybee](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/kybee/32/64269_2.png) [@kybee](https://community.wanikani.com/u/kybee)\
**Post date:** [August 31, 2017, 3:37pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/16 "2017-08-31T15:37:21Z")

</div>

Yep, it was working when I first installed the script. The audio plays correctly across WaniKani, but not during KaniWani reviews.

---

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [September 2, 2017, 9:42am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/17 "2017-09-02T09:42:38Z")

</div>

OK, it still seems to be working fine on every system I have access to. Without a lot more information, there’s not a lot I can do.

Does it work on other computers, or other browsers? Does it work if you turn off all extensions and other scripts, even those that couldn’t possibly interfere?

---

<div class="post-metadata">

**Author:** ![ryan-gustafson](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/ryan-gustafson/32/60666_2.png) [@ryan-gustafson](https://community.wanikani.com/u/ryan-gustafson)\
**Post date:** [September 5, 2017, 4:58am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/18 "2017-09-05T04:58:30Z")

</div>

Any chance we could get the audio played for the entered response, and not just the first synonym? It’s a bit jarring to hear the wrong audio, and even more so when it’s for a vocab you haven’t learned in WK yet.

Something like:

1. If i-th kana element matches user answer, use i-th kanji.
2. Otherwise, if i-th kanji element matches user answer, use i-th kanji.
3. Otherwise, use 0-th kanji.

I could take a crack at it too, if you’re accepting PRs.

---

<div class="post-metadata">

**Author:** ![synecdoche](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/synecdoche/32/7841_2.png) [@synecdoche](https://community.wanikani.com/u/synecdoche)\
**Post date:** [September 7, 2017, 9:16am UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/19 "2017-09-07T09:16:10Z")

</div>

That’s definitely a good idea. I am very happy to accept pull requests.

---

<div class="post-metadata">

**Author:** ![henshin5](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@henshin5](https://community.wanikani.com/u/henshin5)\
**Post date:** [September 26, 2017, 4:19pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/20 "2017-09-26T16:19:10Z")

</div>

Hey there! I have just downloaded KaniWani Audio and it’s wonderful!. I just wanted to say that for me, the audio does not autoplay after a correct answer, it only plays when I click the “Kanji” button.

Is this how it should work? Or should it autoplay as soon as I hit the enter key and the answer turns green?

I’m using Chrome on OSX. I have disabled all my adblockers and I don’t have any prevent html5 audio autoplay extension.

Thank you for your hard work!

---

<div class="post-metadata">

**Author:** ![Daelith](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@Daelith](https://community.wanikani.com/u/Daelith)\
**Post date:** [October 2, 2017, 11:30pm UTC](https://community.wanikani.com/t/userscript-kaniwani-audio/19314/21 "2017-10-02T23:30:46Z")

</div>

I just tested it in Tampermonkey and it seems that there is an error in the script. The init clause that adds the DOM observer for answerPanelChanged adds it to the \_detailKanji element instead.

Change line 65: kwa.observeDOM(kwa.\_detailKanji, function() {  
To: kwa.observeDOM(kwa.\_answerPanel, function() {

Seems to be a copy paste error from the previous init clause above.

[Next page](https://community.wanikani.com/t/userscript-kaniwani-audio/19314.md?page=2)
