Home

Awesome

Generate Batch Audio

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.

Contents


Motivation

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!

<div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>

Quick Start

Anki addon page: https://ankiweb.net/shared/info/1156270186

  1. Download Anki
  2. In Anki, go to Tools -> Addons -> Get Addons... and paste the code: 1156270186
  3. Restart Anki
  4. Open the Anki browser and select the cards that need audio
  5. Go to Edit > Generate Bulk Audio..., or use the shortcut Ctrl+Alt+B
<div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>

Notes

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.

<div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>

Usage Guide

<div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>

Credits

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:

<img src="https://github.com/Aquafina-water-bottle.png" width="60px;"/> <img src="https://github.com/sammy-snipes.png" width="60px;"/> <img src="https://github.com/elizagamedev.png" width="60px;"/> <img src="https://github.com/B0sh.png" width="60px;"/>

<!-- [<img src="https://github.com/ .png" width="60px;"/>](https://github.com/_________) --> <div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>

Screenshots

image

image

<div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>

Contributing

Please help support the development of this addon by:

Please Star generate-batch-audio-anki-addon to support growth!

<div align="right">[ <a href="#contents">↑ Back to top ↑</a> ]</div>