An addon that downloads and attaches audio to flashcards in bulk from URLs. Made for Anki, an SRS flashcard application.
Written in Python, using the requests library for handling GET API calls, and PyQT for the UI elements added in Anki.
After finally getting my Japanese flashcards set up and getting many many hours into mining and repping vocab, I reached the point where I wanted to ensure that my pitch accent was on par with native speech, and the best way to do this would be to hear a native speak my vocab words many many times.
However, when I decided to make this change and add audio to all my flashcards, I quickly realized that doing this the manual way --one card at a time-- was going to take too long as I had reached over 5000 cards created already. After searching for an answer online and coming up short, I decided to create this addon so that I, and hopefully many others like me, would not have to suffer through hours of tedious work.
Hopefully you, like me and the hundreds of others who have downloaded my addon, can benefit from my work!
Anki addon page: https://ankiweb.net/shared/info/1156270186
Tools -> Addons -> Get Addons...
and paste the code: 1156270186
Edit
> Generate Bulk Audio...
, or use the shortcut Ctrl+Alt+B
Although this addon was initially created with Japanese cards in mind, it should also work for any other language provided that the fields and URLs are setup correctly.
This addon only works for Anki versions 2.1.45 and above.
Edit
> Generate Bulk Audio...
, or use the shortcut Ctrl+Alt+B
{}
Reading
, you may use {reading}
where the reading should go in the URLAudio field:
selection will determine which field on the selected cards the audio will be save to
Filter kana:
selection should be used to filter out non-hiragana characters from a field before using it
(None)
if your cards aren't JapaneseReading
field looks like 私[わたし]
, the kanji and brackets would cause the word to not be found.
Enabling Filter kana for the Reading
field would instead turn it only into hiragana which would allow the word to be correctly foundDelay between requests:
amount is simply how long in seconds the addon should wait between download requests
Duplicate to empty fields:
checkbox should generally be enabled
Word
/Expression
field in hiragana, and the Reading
field has nothing.
In this case, the Word
/Expression
field would be used in place of both fieldsDangerously fast:
checkbox will remove a 0.1 second delay between audio downloads
Credit goes to the Batch Editing addon from which I used its code as a base template. This was my first Anki addon, and I would have been extremely lost if there weren't such a similar addon to mine already created and open source.
Additionally, credit goes to Yomichan by FooSoft Productions from which I used their idea for comparing audio files. This made it possible to use JPod101 audio since they return an audio file whether or not one was actually found.
Last but not least, thanks to everyone who has contributed to this project, your support is always very much appreciated, and a special thanks to the following contributors that helped get this addon off the ground:
Please help support the development of this addon by: