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:
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 生成的本地音频
-
准备好 Kokoro-FastAPI 服务
https://github.com/remsky/Kokoro-FastAPI
-
扩展配置
- 填入 Kokoro-FastAPI 的 url
- 需要的语言及其对应的voice
补充
Linux不像其他操作系统有内置的TTS引擎,所以只能通过扩展从云服务下载音频文件来实现TTS,比如:
我平时主要在Linux上学习,使用这些的方案,经常会碰到的问题是:
- 延迟
- 网络中断后再恢复不能发音(需要重启anki)
- 切换用户后不能发音(需要重启anki)
所以常常是苦不堪言,最近接触到 Kokoro 后,才探索出这个方案,其实就是基于 gTTS 修改,将其原来从 Google Translate 下载音频的部分换成从 Kokoro-FastAPI 的本地服务,解决了高延迟和网络中断的问题,顺便把切换用户的问题也解决了。