In my opinion, Anki (https://apps.ankiweb.net/#downloads) is a powerful tool for learning personalized vocabulary in a foreign language. It can be a useful supplement for students taking language courses.
However, if your goal is to learn Japanese and you're using Linux, the initial setup can be complicated.
I'll try to simplify the Anki setup with the following steps, which I tested on Linux Mint 22 and Anki Launcher 25.09.
== Card templates for studying kana (or kanji) with TTS ==
A new “note type” is useful for studying Japanese. I called it "Basilare - Da italiano a giapponese kana" (in English: "Basic - From Italian to Japanese kana"). My goal is to display one to three Italian meanings on each card and then ask the student to write the Japanese equivalent in kana. Then, the student can check their answer and hear the correct Japanese pronunciation.
To make my templates work, six new fields are needed. Since I'm Italian, I've named the fields in my own language. If you change them to suit your native language, keep in mind that you'll then need to modify the templates accordingly:
1. Italiano1
2. Italiano2
3. Italiano3
4. Kana
5. Kanji
6. Esempio
The first three fields indicate three possible meanings in the source language (only the first is required), the fourth field contains the kana writing (required), the fifth the kanji writing (optional), and the sixth an example sentence (optional).
Leave all the settings as they are. For the fourth field, "Kana", select "Sort by this field in the browser".
Now you can copy and paste the following snippets.
Front template:
<div class="meaning">
<div class="it1">{{Italiano1}}</div>
{{#Italiano2}}
<div class="itx">{{Italiano2}}</div>
{{/Italiano2}}
{{#Italiano3}}
<div class="itx">{{Italiano3}}</div>
{{/Italiano3}}
</div>
<div class="prompt">Scrivi in kana</div>
{{type:Kana}}Back template:
{{FrontSide}}
<hr id=answer>
<div class="jp-block">
<div class="label">Kana</div>
<div class="kana">{{Kana}}</div>
{{#Kanji}}
<div class="label">Kanji</div>
<div class="kanji">{{Kanji}}</div>
{{/Kanji}}
</div>
{{#Esempio}}
<div class="label">Esempio</div>
<div class="example">{{Esempio}}</div>
{{/Esempio}}
<div class="label">Audio</div>
<div class="tts">{{tts ja_JP:Kana}}</div>Style:
.card {
font-family: sans-serif;
font-size: 22px;
text-align: center;
padding: 18px;
}
.meaning {
margin-bottom: 14px;
}
.it1 {
font-size: 1.35em;
font-weight: 700;
margin-bottom: 8px;
}
.itx {
font-size: 1.05em;
margin-top: 4px;
}
.prompt {
margin-top: 14px;
margin-bottom: 8px;
font-size: 0.95em;
}
#typeans {
font-size: 1.2em;
margin-top: 10px;
}
.jp-block {
margin-top: 8px;
}
.label {
margin-top: 14px;
margin-bottom: 4px;
font-size: 0.8em;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.kana {
font-size: 1.8em;
line-height: 1.35;
}
.kanji {
font-size: 1.6em;
line-height: 1.35;
}
.example {
margin-top: 4px;
font-size: 1.05em;
line-height: 1.5;
}
.tts {
margin-top: 6px;
}== Aivis TTS Setup ==
The {{tts ja_JP:Kana}} field in the back template uses the default TTS on your machine. This field works out of the box on Ankidroid (Anki for Android) and Anki for macOS. To ensure maximum compatibility across operating systems, no particular voice is specified, only the Japanese language.
On Linux, things are a bit more complicated, because Anki doesn't have a default TTS. So, I did some research to find a high-quality free voice. Ultimately, I came across the Aivis Project, which has excellent Japanese voices.
I've chosen Honoka's voice. This voice is based on recordings of a 20-year-old Japanese woman in real life. Here is a voice sample:
https://hub.aivis-project.com/aivm-models/59f96896-64d2-4378-830a-4d5feb3d81aa
Note that the URL contains the UUID 59f...1aa needed for installation.
The Aivis Project website states that it is compatible with Windows and macOS, but it does not mention Linux. That's not a problem, though, because I've created my own installer.
Save https://www.informatica-libera.net/files/setup-aivis-jp-tts.txt as setup-aivis-jp-tts.sh in your home directory and give it execution permission.
Then:
$ ./setup-aivis-jp-tts.sh --no-interactive --voice-uuid "59f96896-64d2-4378-830a-4d5feb3d81aa"
It needs to perform a very heavy download. If it times out, run it again.
Finally, try it.
Test 1:
$ aivis-jp-tts "こんにちは。テストです。" ~/Music/test1.mp3
Test 2:
$ aivis-jp-tts --speed 1.0 "こんにちは。テストです。" ~/Music/test2.mp3
== Anki add-on for Aivis TTS ==
Anki doesn't know how to use Aivis, so I created a specific add-on.
First, check the full path of aivis-jp-tts:
$ command -v aivis-jp-tts /home/francesco/bin/aivis-jp-tts
Then check that add-ons folder exists:
$ [ -d ~/.local/share/Anki2/addons21 ] && echo "OK" || echo "Dir not found" OK
Create a folder named aivisjp inside it:
$ mkdir -p ~/.local/share/Anki2/addons21/aivisjp
Close Anki if it's open and save my add-on:
$ cd ~/.local/share/Anki2/addons21/aivisjp $ wget -O '__init__.py' 'https://www.informatica-libera.net/files/anki-addon-for-aivis.txt' $ cmd="$(command -v aivis-jp-tts)" && [ -x "$cmd" ] && sed -i.bak "s|^AIVIS_CMD = \".*\"|AIVIS_CMD = \"$cmd\"|" __init__.py
The last command set the correct full path in AIVIS_CMD. We can open the file and check it.
Finally, we can reopen Anki and verify that the add-on is installed and enabled.
== Keyboard setup ==
According to Anki's Linux documentation, its standard build includes Fcitx support, though it may not work on all distributions. Recent reports on the Anki forum regarding Ubuntu and Linux Mint show instances where Japanese input fails inside Anki, even though it works elsewhere. The same occurred for me. Then, switching to IBus + Mozc caused it to start working again.
So, I solved it this way:
$ sudo apt update $ sudo apt install ibus ibus-mozc mozc-utils-gui $ im-config -n ibus $ ibus-daemon -drx
im-config -n ibus makes IBus the active input-method framework for the desktop session, which helps Qt/GTK applications such as Anki see the correct IME instead of falling back to a setup Anki does not handle reliably.
The last command should prevent the need to log out and log back in as the current user. However, if that doesn't work, log out and log back in or restart your computer.
(April 22, 2026)