4

There is an import feature on Anki that allows the user to import their CSV files saved in UTF-8 encoding, which the program later converts to .akpg files.

I would like to add sounds (ideally .mp3 audio) to each flashcard of my deck, which doesn't seem possible using those CSV files.

Is there a solution to this issue that does not involve programmatically generating the .apkg? And if not, how can I write a program to do so (preferably in Java)?

2 Answers2

4

As far as I know (and used) you can just:

  • use a phrase like "[sound:FILE1.mp3]" inside your card's text and import such a .TXT/.CSV into your deck
  • copy all needed media files (here: FILE1.mp3) into your anki's "collection.media" folder (take care to avoid name collisions - it looks all the media files are stored together so using a name prefix common for your batch would be sensible)

That should be enough to get your audio played during learning.

You can then export the deck having "with media" option checked to have it packaged nicely into .apkg to use it elsewhere (import is intelligent enough to rename imported media files so users of such a package need not to worry about name collisions).

woj
  • 156
  • 2
  • Thank you, @woj. I tried this strategy and it works. I spent some time trying to find the "collection.media" folder, and I couldn't find it easily searching on the internet. After some research, I discovered it's usually in the "My Documents" directory on Windows. I am just adding this note in order to help other people in the future. – Charles Reis Ribeiro Apr 05 '17 at 16:47
  • Doesn't work anymore in latest Anki 2.1.38. Also tried pressing Check Media. – Polv Mar 04 '21 at 05:55
3

I'm going to go out on a limb here and assume that you are attempting to add pronunciations to a language-focused deck. If this is the case, you could sidestep your problem using the AwesomeTTS Anki addon. This addon allows you to bulk generate sound files based on a field in existing cards, using a number of text-to-speech services.

Geoff
  • 403
  • 4
  • 11