When I finish my daily Anki work, I usually have 60 to 80 cards to review, which can take me one or two hours of sitting still. To free up my hands, I wrote a piece of code that converts the cards into several MP3 files with lyrics, so that I can listen to them while doing chores or go jogging.
-
modify config.ini At least, you should point out which fields should export to be converted to sound and which need'nt.
.
-
Export your cards(notes). you should mark some cards in Anki first (use short-cut key Ctrl-1 for Red , Ctrl-2 for Orange ... ) run readcolored.py (or readcolored.exe)first. There will be new some files created in folder ./selectednotes ,like 2.json, 3.json
there is also a file clearFlag.py (or Exe) can clear all flags you marked. 2. if something wrong, open and setup config.ini. I personally ignored Red cards, only export other colored cards.
- Different filename brings different kind of mp3. For example, if the filename have letter "4" (eg. "4.json") it will contain explanations.
4.run tts.py (after you setup venv and install all the required imports) or tts.exe
5.you will defintely find some errors. fix them, and you will have an mp3 file generated by TTS and it's rylic file.
- The only useful file is tts.py. Try to debug it.
- This program supports TTS and gTTS, but I also copied some pronunciation MP3 files from my local disk, which you should disable and change to TTS. gTTS is much better, but the connection is very bad in my country. I suggest you change the code to disable other engines and use gTTS instead.