tts_for_linux use Kokoro-FastAPI

AnkiWeb addon 733203228

Enables text-to-speech playback of locally generated Kokoro audio via a configured Kokoro-FastAPI service URL and per-language voices, avoiding cloud latency and network or profile-switch failures on Linux.
AI-generated summary; may contain mistakes.

sync-integrationbugfix-workaround

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (👍 0 · 👎 0)
Updated
2025-07-28
Anki versions
25.02.7~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
zh

Maintenance

stale

  • Last update or commit: 2025-07-28 (461 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.125.02.7+2025-07-28
History across monthly snapshots

Loading…

Similar addons

Gemini Speak

Uses Google Gemini AI to rewrite selected Anki text for natural speech, then generates audio with voice, model and processing-mode controls, smart caching and no external dependencies.

card-creationai

13 votes 58% approval 👍 11 · 👎 2 ⭐ 0 Anki 2.1.66~ Updated 2025-06-11

Description

Function: It allows TTS playback of local audio generated by Kokoro.

1. Kokoro-FastAPI Service: https://github.com/remsky/Kokoro-FastAPI

2. Addon Configuration:

  • The URL of Kokoro-FastAPI.
  • Specify the required languages and their corresponding voice.

Addendum

Unlike other operating systems that have built-in TTS engines, Linux can only achieve TTS by downloading audio files from cloud services through addons, such as:

  • AwesomeTTS
  • gTTS

I primarily study on Linux and frequently encounter issues with these solutions, including:

  • Latency
  • Inability to pronunciation after network interruption (requires restarting Anki)
  • Inability to pronunciation after switching profile (requires restarting Anki)

This has often been a painful experience. Recently, after encountering Kokoro, I explored this solution. It's essentially a modification of gTTS, replacing its original audio download process from Google Translate with local service requests to Kokoro-FastAPI. This resolves the issues of high latency and network interruptions, and incidentally, also solves the profile-switching problem.

这是一个anki扩展

作用是让 tts 播放 Kokoro 生成的本地音频

  1. 准备好 Kokoro-FastAPI 服务 https://github.com/remsky/Kokoro-FastAPI

  2. 扩展配置

    • 填入 Kokoro-FastAPI 的 url
    • 需要的语言及其对应的voice

补充

Linux不像其他操作系统有内置的TTS引擎,所以只能通过扩展从云服务下载音频文件来实现TTS,比如:

  • AwesomeTTS
  • gTTS

我平时主要在Linux上学习,使用这些的方案,经常会碰到的问题是:

  • 延迟
  • 网络中断后再恢复不能发音(需要重启anki)
  • 切换用户后不能发音(需要重启anki)

所以常常是苦不堪言,最近接触到 Kokoro 后,才探索出这个方案,其实就是基于 gTTS 修改,将其原来从 Google Translate 下载音频的部分换成从 Kokoro-FastAPI 的本地服务,解决了高延迟和网络中断的问题,顺便把切换用户的问题也解决了。

README

This is an Anki addon.

Function: It allows TTS playback of local audio generated by Kokoro.

1. Kokoro-FastAPI Service: https://github.com/remsky/Kokoro-FastAPI

2. Addon Configuration:

  • The URL of Kokoro-FastAPI.
  • Specify the required languages and their corresponding voice.

Addendum

Unlike other operating systems that have built-in TTS engines, Linux can only achieve TTS by downloading audio files from cloud services through addons, such as:

  • AwesomeTTS
  • gTTS

I primarily study on Linux and frequently encounter issues with these solutions, including:

  • Latency
  • Inability to pronunciation after network interruption (requires restarting Anki)
  • Inability to pronunciation after switching profile (requires restarting Anki)

This has often been a painful experience. Recently, after encountering Kokoro, I explored this solution. It's essentially a modification of gTTS, replacing its original audio download process from Google Translate with local service requests to Kokoro-FastAPI. This resolves the issues of high latency and network interruptions, and incidentally, also solves the profile-switching problem.


这是一个anki扩展

作用是让 tts 播放 Kokoro 生成的本地音频

  1. 准备好 Kokoro-FastAPI 服务 https://github.com/remsky/Kokoro-FastAPI

  2. 扩展配置

    • 填入 Kokoro-FastAPI 的 url
    • 需要的语言及其对应的voice

补充

Linux不像其他操作系统有内置的TTS引擎,所以只能通过扩展从云服务下载音频文件来实现TTS,比如:

  • AwesomeTTS
  • gTTS

我平时主要在Linux上学习,使用这些的方案,经常会碰到的问题是:

  • 延迟
  • 网络中断后再恢复不能发音(需要重启anki)
  • 切换用户后不能发音(需要重启anki)

所以常常是苦不堪言,最近接触到 Kokoro 后,才探索出这个方案,其实就是基于 gTTS 修改,将其原来从 Google Translate 下载音频的部分换成从 Kokoro-FastAPI 的本地服务,解决了高延迟和网络中断的问题,顺便把切换用户的问题也解决了。