Export audio from Anki cards into audio files and play them everywhere!
I wrote Handsfree because I wanted to review my cards even at times when I can't interact with Anki. That could be when doing house chores, walking or cycling (only off-road!). With this addon, you can easily export cards in Anki into audio files and play them in any media player.
For vocabulary acquisition, pairing with the AwesomeTTS addon is recommended.
- Export to most audio formats
- Customizable delay between answer and question
- A audible countdown before answer and repeating question and answer after answer (useful for learning vocabulary)
Right now, Handsfree isn't as polished as some other Anki addons and requires some extra work. It shouldn't be too hard, though, and if you struggle with the process, feel free to ask in Issues or me directly.
- Open your Anki addons folder
Open Anki and in the top menu choose Tools » Add-ons » Open Add-ons Folder.... - Extract the addon
Copy all files fromsrc
into your addons folder – i.e. thehandsfree.py
file and thehandsfree
folder. - Install ffmpeg
- Windows and OS X: You can download ffmpeg here – choose any version, your platform, and "static linking". Open the archive and in the
bin
folder, find a file calledffmpeg
(for OS X) orffmpeg.exe
(for Windows). Extract this file into thehandsfree
folder in your Anki addons folder. This file is all you need, you don't need anything else from the archive. - Linux: The easiest option is to install ffmpeg with your package manager. Open a terminal window and try to execute
sudo yum install ffmpeg
,sudo aptitude install ffmpeg
orsudo pacman install ffmpeg
. Chances are one of them will work. If not, just google how to install ffmpeg.
- Windows and OS X: You can download ffmpeg here – choose any version, your platform, and "static linking". Open the archive and in the
Right now. most of the configuration is done in a JSON file <Anki addons folder>/handsfree/config.json
. It looks like this:
{
"qa_delay": 5000,
"aq_delay": 2000,
"countdown": true,
"repeat": true,
"query": "deck:current",
"output_directory": "~\\Dropbox",
"output_format": "opus",
"output_bitrate": "32k",
"output_filename": "cards.opus",
"output_individual": false,
"output_individual_filename_pattern": "card_{:03d}.opus",
"audio_tags": {
"title": "Anki Handsfree Export",
"album": "Anki Handsfree",
"artist": "Anki Handsfree"
}
}
qa_delay
andaq_delay
are delays (in ms) between question and answer, and answer and question respectively.- If
countdown
is true, a beeping countdown will be played before the answer. - if
repeat
is true, question and answer will be repeated once again after answer, this time with only very short (500ms) delays. query
determines which cards will be included. You can test this in the browser.output_...
options determine where to save the audio file, how to name it, what format to use (e.g.opus
,mp3
oradts
for aac), as well as the bitrate.- If
output_individual
is true, a file will be created for each card.output_individual_filename_pattern
should then contain a pattern for the Pythonformat()
function. E.g. if you setcard-{:003}.opus
, the files will be namedcard_000.opus
,card_001.opus
,card_002.opus
, etc. - Values from
audio_tags
will be shown in your player.
When the configuration is ready, open Anki and in the main window, choose Tools » Handsfree export and follow the prompts.
Please don't hesitate to post bug reports or ask any questions.
- Save audio files in a cloud storage (e.g. Dropbox) and sync them to your phone automatically via an app, e.g. FolderSync.
- If you don't want to clutter your cards with the extra
[sound:...]
tags (that are needed for Handsfree), just create new cards with those tags, and then use the Anki's Deck Override feature to automatically put these cards in a different deck (to ignore them easier).
My cards are omitted
In order to process the cards, they need to contain the [sound:...]
tag in both the question and the answer.