Hi all,

A few friends of mine wanted to learn languages: one Italian, another English, and so on. My language doesn’t have many good resources for their specific cases, but I knew of plenty of decks that were exactly right, if only one side of the cards were in our language.

So I built a tool that translates one side of a deck automatically, with DeepL or Gemini.

Then I found out translating wasn’t enough: one friend needed the cards reversed, so I added that. Another friend had incredible flashcards with no audio, so I added audio too, with Azure neural voices. You pick the voice from a list, can preview it, and can set speed and style. Results are cached, so re-running a deck doesn’t burn your API quota.

By then it had turned into a proper tool, so I packaged it: Windows and Linux downloads that run right away, with no Python, pip or setup. Double-click and it opens in its own terminal window.

Download (Windows .exe, Linux AppImage / tar.gz): https://github.com/ezxpro/AnkiDeckTranslator/releases/latest

Linux AppImage: chmod +x it, then double-click or run it.

Source and issues: https://github.com/ezxpro/AnkiDeckTranslator

Heads up: the code was written entirely by AI and I’m not planning to maintain it actively, so expect rough edges and back up your collection before using it on decks you care about. Pull requests are very welcome.


API keys (all of them have free options)

You bring your own keys. A 5,000-card deck with about 50 characters per card is roughly 250k characters, so most decks fit in the free tiers.

Translation

  • DeepL: free API plan, 500,000 characters/month. Best quality for mainstream languages. A free key ends in “:fx”. When you hit the limit it stops until next month.
  • Gemini: free via Google AI Studio. The limits change from time to time, so check your own quota in the AI Studio console. A Flash-Lite model has the highest free limits and is plenty for translation. Note that Google may use free-tier prompts to improve its products, so don’t send private content.

Audio (Azure Speech)

  • Free tier (F0): 500,000 characters/month of neural voices. That’s enough for a few decent-sized decks per month. HD voices are probably not included, so check in the portal.
  • Paid tier (S0): roughly $16 per million characters for neural voices and $22 for HD (prices change, so check Azure’s pricing page). A 250k-character deck costs a few dollars even with HD.
  • The best deal: a new Azure account gets a $200 credit for the first 30 days, and it covers S0. That’s HD voices and way more than the free 500k characters, enough for around 9 million characters of HD audio (a rough estimate from the prices above, so check your own portal). You can voice every deck you’ve ever wanted in one sitting.
  • To use it, create the Speech resource as S0, not F0. The credit only pays for paid resources.
  • After the 30 days it bills your card, so set a budget alert in Cost Management and delete the resource (or switch it to F0) when you’re done.

Tips

  • Keep the cache folder between runs, so you never pay twice for the same card.
  • Do all the heavy audio work in one go while the $200 credit lasts. It’s a one-month window, so line up your decks first.

If you’ve got a deck you wish existed in your language, give it a try. I’d love to hear how it goes.

  • one_old_coder@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    18 days ago

    I’m offended because you actively contribute to the degradation of software engineering by shoving in our faces some code that you didn’t check (“working fine” and full of bugs?), and by putting a license on code that you did not wrote.

    You’re like the script kiddies of the 90s who were destroying stuff and said “Who cares? I’m having fun.”