AwesomeTTS-AI-Version(unofficial)

AnkiWeb addon 903988322

Generates Anki audio via a local Kokoro text-to-speech service and other OpenAI-compatible TTS models, supporting multiple languages.
AI-generated summary; may contain mistakes.

card-creationsync-integrationfork-or-reupload

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
14 (๐Ÿ‘ 12 ยท ๐Ÿ‘Ž 2)
Updated
2025-02-13
Anki versions
24.04~
Description language
en

Maintenance

stale

  • Last update or commit was 592 days before the snapshot (2025-02-16).
  • The repository has 2 test files.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.5024.04+2025-02-13
History across monthly snapshots

Loadingโ€ฆ

Similar addons

README

Introduction

Kokoro TTS is the latest lightweight and high-performance text-to-speech (TTS) model for 2025. The generated audio is almost indistinguishable from that of a real person in terms of tone and intonation. You can give it a try at this link. What's even more impressive is that its model parameters are minimal, which means it can run smoothly on a regular CPU and GPU in a home computer. Moreover, it supports generating American English, British English, Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese, and Mandarin Chinese.

I've been using the AwesomeTTS plugin to generate audio in Anki with the free service, and I've always felt that the quality of the generated audio wasn't up to par. So, I installed the Kokoro TTS model locally, and also made improvements to the AwesomeTTS, adding the ability to call the local Kokoro service.

screenshot

Addon Installation

Since the author of AwesomeTTS has stopped updating AwesomeTTS and has shifted to maintaining another project called HyperTTS, you can completely disable or remove the AwesomeTTS plugin from the Anki plugin page without any worries. Then, enter the plugin code 903988322 to install the AwesomeTTS-AI-Version (unofficial).

Model Download

After installing the plugin, you also need to download Kokoro's model using Docker locally. Enter one of the following two commands in the command line, then configure the plugin to access the Kokoro API address, which is default to http://localhost:8888/v1/audio/speech. Note that if you change the container's port, make sure to update the port number in the API address.

docker run -p 8888:8880 ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.0 # CPU, or:
docker run --gpus all -p 8888:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.0  #NVIDIA GPU

Here is a detailed tutorial for everyone

Cautionary Notes

  • At present, Chinese and Japanese voice only supports generating English with Chinese and Japanese accents.
  • If the following error occurs and voice generation is not possible, please check and troubleshoot the issues in the following order:

screenshot

  1. Check if the Kokoro model is open in Docker Desktop
  2. Restart Anki and try generating with another Voice

OpenAI Compatible

Additionally, I've added OpenAI Compatible (OpenAI Interface Compatible) service, which means you can install other OpenAI compatible TTS models locally (such as openai-edge-tts) for tts service.

Be mindful that when using OpenAI Compatible, there may be instances where you've selected OpenAI Compatible, but the generated voice turns out to be Kokoro's. This is likely due to a caching issue; providing it with a new word to generate should refresh the cache.

screenshot

License

AwesomeTTS-AI-Version-unofficial-: GPL-3.0 license anki-awesome-tts: GPL-3.0 license