somstuff
Member
Registered: 2012-06-18
Posts: 65
If I have a text file or anki deck, is there a way to add JDIC audio to everything? The Audio Download plugin only downloads for the current card, right? JDIC seems to be better than the GoogleTTS audio...
cryptica
Member
From: Tokyo, Japan
Registered: 2011-03-18
Posts: 17
There is audio recorded by native speakers available on JapanesePod101, which is the one used by JDIC. It's under the URL http://assets.languagepod101.com/dictio … ;字. Just replace かな and 漢字 by the kana and kanji, respectively.
I wrote an Anki plugin for myself to download audio for cards in my deck and write the filename in a field. Anki shared plugin upload seems to be disabled for now, so I uploaded it here: http://pastebin.com/ZYQerXFA
It works for me, but haven't tested it that much, so use at own risk and try it on a small deck first. You need to edit the file to set model and field names correctly for your own deck first.
cryptica
Member
From: Tokyo, Japan
Registered: 2011-03-18
Posts: 17
Good it works for you now :-)
As to not download audio repeatedly, the plugin skips cards for which either the audio file is already present (so if you have bogus files they won't get updated) or for which the audio field contains something other than whitespace. So if you leave the "audio not found" message empty, the plugin will try to re-download the missing media again every time, which takes some time. But you could just change it to one character like - or set the font color to the background color in Anki if it annoys you.
Writing the kana in a new field is definitely possible, it's just a matter of coding ^^ Wasn't much work based on my script, so I made a Kana update script: http://pastebin.com/pTwnQDgW
Just set NEW_KANA_FIELD to the new field name, and run the plugin once to fill the field. Then you can point KANA_FIELD of the audio plugin to that field.
Thank you cryptica! I could generate a "kana" field now. I was wondering, I had wrongly configured Rikai-sama for a long while, so it was saving the audio to the Audio field withou the [sound:$a] meaning without the brackets and the 'sound:' part, so a lot of cards remain looking like kana - kanji.mp3 and Anki cannot detect them as sound files...
Is there any way to clear the Audio field and re-fill it using your Audio plugin? 
[Edit] I edited the fill_in.py file where to get the kana and where to put the audio and emptied my Misc.media folder, however, the plugin does not download the new audio files. It remains empty...
Last edited by Tori-kun (2012 August 04, 10:02 am)
cryptica
Member
From: Tokyo, Japan
Registered: 2011-03-18
Posts: 17
You can clear the Audio field from Anki by selecting all the cards to update in the card browser, then choosing Edit -> Find and Replace from the menu, entering .* as the Find query, selecting the Audio field as In, leaving Replace With empty and checking Treat input as regular expression. Then pressing Ok should clear the Audio field.
After that with an empty media folder the plugin should try to download audio for all cards. This probably takes some time, so don't exit Anki in between.
Last edited by cryptica (2012 August 04, 11:22 am)
It seems to have downloaded successfullz about 1430 mp3 files. I checked the .media folder, however, after a certain time, no more new files were downloaded for some strange reason. (I knew, it would take time, but I checked network-activity and saw no new files being downloaded. Perhaps languagepod101 has a limit for downloading?)
Any clue? My deck has about 5500 cards.. I expect for something like 1000 no audio could be found, but 1430 just seems to less 
cryptica
Member
From: Tokyo, Japan
Registered: 2011-03-18
Posts: 17
I don't really have any clue, but it could be that languagepod101 has a download restriction.
For the cards that didn't get mp3 files, did the plugin write anything in the audio field? If not, you could try to start the plugin again later to resume downloading. If it works then, the problem would with languagepod101, otherwise I guess it could be a plugin error.