惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
GbyAI
GbyAI
博客园 - Franky
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
I
InfoQ
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
有赞技术团队
有赞技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
博客园 - 【当耐特】
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Project Zero
Project Zero
量子位
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
美团技术团队
Attack and Defense Labs
Attack and Defense Labs
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Troy Hunt's Blog
Google Online Security Blog
Google Online Security Blog
罗磊的独立博客
P
Proofpoint News Feed
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
S
SegmentFault 最新的问题
L
LINUX DO - 最新话题
Simon Willison's Weblog
Simon Willison's Weblog
爱范儿
爱范儿
博客园 - 聂微东
A
About on SuperTechFans
PCI Perspectives
PCI Perspectives
D
Docker

ariya.io

The Illusion of Perfect LLM Code One Decade Later: Revisiting Five Front-End Kung Fu Moves GTX 1080 Ti for Local LLM Not Everything is an Agent Afterburner and Power Limit Privacy-Preserving Personal Search Appliance LLM Inference Machine for $300 Deploying an Uberjar to Dokku Continuous Integration for React Native Apps with GitHub Actions On GitHub Actions with MSYS2 Cross-compiling with musl Toolchains Nix Package Manager on Ubuntu or Debian Practical Testing of Firebase Projects Search Box and Cloud Function Automatic Merge of Pull Requests Clang on Windows Continuous Integration of Vanilla C Programs for Intel, ARM, and MIPS Architecture Cross Compiling with Docker on WSL 2 Basics of Memory Access in WebAssembly
Local, CPU-Friendly, High-Quality TTS (Text-to-Speech) with Kokoro
speckx · 2026-07-08 · via ariya.io

#tts #privacy

Just a few years ago, realistic local speech generation seemed unimaginable. Today, its quality is exceptional and, crucially, it delivers these results without compromising privacy.

The video above showcases audio generated from a sample text, running entirely on the local machine previously discussed in the GTX 1080 Ti for Local LLM article. While this machine has a dedicated GPU, the GPU is fully reserved for LLM inference and the speech synthesis is powered entirely by the CPU.

The model used is Kokoro, which, despite having only 82M parameters, produces realistic speech in multiple languages including English, Mandarin, and Hindi. It provides around 50 distinct voices, primarily optimized for English.

There are several ways to set up a server for Kokoro. The simplest method involves using a pre-made container image called Kokoro-FastAPI, which includes pre-downloaded voice models. Because of that, the container image is rather large, at about 5 GB in size.

To launch the container using Docker or Podman, use the following command:

podman run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu

To quickly verify that it runs correcly, the container serves a simple web UI at localhost:8880/web. Here you can generate (and automatically play) an audio given some text.

Kokoro web UI

In addition to the simple web UI, this container also serves a TTS interface compatible with the OpenAI speech API, making it easy to adapt existing programs that already use the OpenAI speech API. To facilitate a quick test, sample code in both JavaScript and Python is available at github.com/remotebrowser/speak. Cloning this repository will enable you to follow the subsequent demonstration.

For JavaScript:

export TTS_API_BASE_URL=http://127.0.0.1:8880/v1
./speak.js "Good morning! How are you today?"

For Python, the command is very similar:

export TTS_API_BASE_URL=http://127.0.0.1:8880/v1
./speak.py "Good morning! How are you today?"

The generated audio will be saved as an MP3 file. If SoX or Sound eXchange (see sox.sf.net for details) is installed on your machine, the audio will also play back automatically.

You can also select a different voice by setting the TTS_VOICE environment variable:

export TTS_API_BASE_URL=http://127.0.0.1:8880/v1
export TTS_VOICE="am_eric"
./speak.js "Good morning! How are you today?"

A complete list of available voices can be found on the official Kokoro project page: huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md.

How fast is the synthesis? Here are some measurements using the am_eric voice on a short test paragraph:

Jupiter is the largest and most massive planet in our solar system. This gas giant, made mostly of hydrogen and helium, is known for its Great Red Spot—a massive storm observed for centuries.

The following list summarizes the generation time (best of 3 runs) across different CPUs:

  • Intel Core i7-4770K: 4.7 seconds
  • Apple M2 Pro: 4.5 seconds
  • AMD Ryzen 7 8745HS: 1.5 seconds

The first CPU in the list was released 12 years ago. If that ancient CPU can do the job just fine, you know that this is a highly capable TTS system.

Finally, for an alternative OpenAI-compatible containerized TTS service, consider Speaches (speaches.ai). Unlike Kokoro-FastAPI, Speaches requires you to explicitly download voice weights via its API, as they are not bundled in the container image. However, Speaches offers an advantage by including Whisper, OpenAI’s renowned high-quality Speech-to-Text (STT) system. If your application needs both TTS and STT functionality, Speaches could be your one-stop solution.

When combined with a local LLM, a speech synthesis system like this allows you to enjoy listening to LLM answers instead of reading them!

Note: This article originally appeared on the Remote Browser Substack.