claudio-audiobook

io.github.restante由 GitHub 账号 restante 发布v0.2.0更新于 Oct 24, 2026

Make audiobooks locally with Kokoro voices from your AI assistant. Nothing leaves your computer.

已验证STDIO仅桌面文件与存储媒体与设计

概览

AI 生成的概览

一个本地 MCP 服务器,让助手在你自己的电脑上用 Kokoro 声音撰写并生成有声书,无需云端语音合成。

可以做什么
制作有声书:助手撰写适合朗读的文本并渲染为有声书文件,可选章节、标签和封面,作为后台任务运行,重启后仍继续,中断后保留已完成章节。查看进度与检查环境:查询渲染任务状态并确认安装是否就绪。列出并选择声音:浏览可用的 Kokoro 声音和语言,选择单一声音或混合两种声音,并设置语速、停顿和输出格式。转换已有文本:把 markdown 文件转为有声书,渲染前预览章节和预计时长,也可选用第二个 Pocket TTS 引擎,支持更多语言和声音克隆。
适用场景
适合需要从零生成或把自己的笔记、文章、文档变成可收听音频的场景,并且希望在本机离线完成,不按字符付费、不需要账号。适合复习笔记、长文章、语言练习或把入职文档做成音频。
运行要求
以 PyPI 包形式通过 stdio 在本地运行,通常用 uvx 启动或用 uv 安装;Claude Code 方式需要 uv。语音模型(约 330 MB)首次使用时下载一次,可选的 Pocket 引擎还会下载 PyTorch 和约 1 GB 的模型。不需要账号、API 密钥或 GPU,仅用 CPU。可通过 CLAUDIO_AUDIOBOOK_* 环境变量设置默认值,如 VOICE、SPEED、FORMAT、OUTPUT 和 AUTHOR。
安装前请注意
会向磁盘写入音频文件,默认位于 ~/Audiobooks 下,强制模式下可能覆盖或重做已有章节。安装时需从 PyPI、GitHub 以及可选 Pocket 引擎所用的 Hugging Face 下载软件包和语音模型,因此需要网络。Pocket TTS 的声音克隆只应用于你有权使用的声音。自动生成的封面仅支持拉丁字体,中日韩标题需自备封面图片。Windows 尚未经过端到端测试。

安装

在 SourceWeft 中

  1. 打开 控制台中的 claudio-audiobook,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🎧 claudio-audiobook

An MCP server that lets your AI assistant make audiobooks

Say "create a python course audiobook". The AI writes it, a local voice reads it. Free, private, offline.

Works with Claude Desktop · Claude Code · Cursor · VS Code (Copilot) · Gemini CLI · Codex CLI · any MCP client

[CI] [License: MIT] [Release] [MCP server] [Python 3.10+] [Runs locally]

Install · Listen · Examples · Voices · Settings


What it is

claudio-audiobook is a Model Context Protocol (MCP) server. You add it to an AI assistant, and the assistant gains the ability to turn text into an audiobook on your computer. It is built and tested first for Claude (Desktop and Code, as a one-click extension and a plugin), and it works with other MCP-capable tools too. It also has a plain command line for use without any AI.

ToolHow to install
Claude Desktopone-click .mcpb extension
Claude Codeplugin, or claude mcp add
Cursormcp.json
VS Code (GitHub Copilot)mcp.json
Gemini CLIsettings.json
Codex CLI (OpenAI)config.toml
Any other MCP client, or no AIstdio command / command line

Not supported: web chat apps that cannot run local MCP servers (the ChatGPT and Gemini websites).

Why

Text-to-speech APIs charge per character and send your text to someone else's server. Audiobook apps only play books that already exist. claudio-audiobook closes the gap: you describe the audiobook you want, Claude writes it as spoken prose, and an 82M-parameter Kokoro voice reads it on your own machine.

claudio-audiobookCloud TTS APIsAudiobook apps
Creates the content for you✅❌❌
Cost per hour of audio£0per-character feessubscription
Text leaves your computerNeverAlwaysn/a
API key or accountNoneRequiredRequired
Chapters in the file (.m4b)✅DIY✅
Works offline after setup✅❌partly

Hear it

Real output, no editing. Voice bf_emma, from the text in docs/samples/python-intro.md:

▶ python-intro-bf_emma.mp3 (18 seconds, 109 KB)

That sample rendered in about 6 seconds on the author's Mac (CPU only). A real 11-chapter, 36-minute exam course took about 3 minutes.

Install in 60 seconds

You need uv for Claude Code (install it: macOS brew install uv, Windows winget install --id=astral-sh.uv -e). Everything else, including ffmpeg, is installed for you. The voice model (about 330 MB, once) downloads on first use.

Claude Code

text
/plugin marketplace add restante/claudio_audiobook/plugin install claudio-audiobook --marketplace restante/claudio_audiobook

Prefer just the MCP server, without the skill?

bash
claude mcp add claudio-audiobook -- uvx --from claudio-audiobook claudio-audiobook-mcp

Claude Desktop

  1. Download claudio-audiobook-<version>.mcpb from Releases.
  2. Open it with Claude Desktop (Settings → Extensions).
  3. Optional: set your default voice, speed and folder in the extension's settings.

Desktop installs the dependencies itself.

Want the Pocket TTS engine in Desktop? Install claudio-audiobook-pocket-<version>.mcpb from the same Releases page instead of the standard one (install one or the other). It adds Pocket TTS (7 languages, voice cloning) and a "Default engine" setting. Its first launch downloads PyTorch and the voice engine, about 1 GB: under a minute on a fast connection in testing, longer on a slow one, and Claude may show the extension as failed until it finishes (wait, then reconnect).

Other AI tools

It is a standard MCP server (stdio), so it is not tied to Claude. Install it once, then point your tool at it:

bash
uv tool install claudio-audiobook                                   # from PyPI; puts claudio-audiobook-mcp on your PATHclaudio-audiobook download-model                                    # the voice model, about 330 MB, onceclaudio-audiobook doctor                                            # checks everything is in place

Installing first matters: the first run of uvx has to download and install everything, which can exceed a client's start-up timeout. If your tool cannot find the command, use its full path (which claudio-audiobook-mcp).

Cursor · ~/.cursor/mcp.json or .cursor/mcp.json
json
{  "mcpServers": {    "claudio-audiobook": {      "type": "stdio",      "command": "claudio-audiobook-mcp"    }  }}
VS Code (GitHub Copilot) · .vscode/mcp.json or run MCP: Open User Configuration
json
{  "servers": {    "claudio-audiobook": {      "type": "stdio",      "command": "claudio-audiobook-mcp"    }  }}

Use agent mode so Copilot can call tools.

Gemini CLI · ~/.gemini/settings.json
json
{  "mcpServers": {    "claudio-audiobook": {      "command": "claudio-audiobook-mcp"    }  }}

or gemini mcp add --scope user claudio-audiobook claudio-audiobook-mcp. Check with /mcp.

Codex CLI (OpenAI) · ~/.codex/config.toml
toml
[mcp_servers.claudio-audiobook]command = "claudio-audiobook-mcp"startup_timeout_sec = 60

or codex mcp add claudio-audiobook -- claudio-audiobook-mcp. Codex waits only 10 seconds for a server to start by default, so raise startup_timeout_sec as above. Check with codex mcp list.

Set defaults (voice, speed, folder) with CLAUDIO_AUDIOBOOK_* environment variables in the same config, for example "env": { "CLAUDIO_AUDIOBOOK_VOICE": "bf_emma" }. Any agent that can run a shell can also use the command line directly.

Status: the server was checked with a generic MCP stdio client (handshake, tool list, a dry run), and the tool schemas are tested to avoid constructs that Cursor and Gemini mishandle. The configs above follow each tool's current documentation but have not yet been run inside those tools. If one doesn't work for you, please open an issue.

Examples

Just ask. Claude agrees the scope, writes the text, shows the chapter list and length, renders in the background and tells you where the file is.

A course from nothing

create a python course audiobook, for beginners, about an hour, in a calm British voice

Your own text

Turn ~/notes/book.md into an audiobook.

Steer it in plain English

slower · a different voice · mix af_heart and bf_emma 60/40 · longer pauses between sentences · make it mp3

Ideas people can do with it

  • 🎓 Revision notes or an exam course you can listen to on the commute
  • 📰 A long article or paper, read aloud while you cook
  • 🧒 A bedtime story, in a voice you picked
  • 🌍 Language practice: an Italian text read by if_sara, or an English text read with a French accent
  • 💼 Onboarding docs or a team handbook as a podcast-style audio file

What you get

text
~/Audiobooks/python-for-beginners/├── python-for-beginners.m4b      ← one file, with chapter marks├── 01-welcome.wav├── 02-variables.wav└── ...

[Cover, tags and chapter list read from a finished .m4b]

Command line

A real run (from docs/samples/python-intro.md): three chapters in, one .m4b with chapter marks out.

[Terminal: claudio-audiobook builds an m4b with three chapters]

No Claude needed for text you already have:

bash
uvx --from claudio-audiobook \  claudio-audiobook build book.md --voice bf_emma --speed 0.95

Preview before rendering. This is real output:

text
$ claudio-audiobook build course.md --dry-run  1  01-welcome.wav                                 ~  0.1 min  2  02-variables.wav                               ~  0.1 min  3  03-loops.wav                                   ~  0.1 min3 chapters, about 0.0 h of audio

Chapters start at # headings (or lines like Chapter 3); a file without headings is cut into parts. Interrupted? Run it again: finished chapters are kept, and only chapters whose text or settings changed are redone.

Play it anywhere: chapters, tags and cover art

The default output is an M4B, the standard audiobook file: AAC audio with chapter marks, the tags players use to file it under Audiobooks (title, author, narrator, genre "Audiobook"), and a cover.

[A generated title cover]
  • Cover art is made for you, locally. Ask the AI for a look ("a dark green cover"): it picks the colours and passes them as cover_colors. Or give your own picture: "use ~/Pictures/cover.png" (--cover). A cover.jpg or cover.png you drop in the book's folder is used too. --cover none skips it.
  • Author and narrator come from the chat ("by Ada Lovelace") or the --author flag. Set a default author once in the Desktop extension settings.
  • The generated cover uses the built-in Latin font: titles in Chinese, Japanese or Korean show empty boxes, so give those books their own cover image.

Import it into:

WhereHow
Apple Books (Mac, iPhone, iPad)drag the .m4b onto Books, or share it from Files
BookPlayer (iOS, chapters tested), Audiobookshelf, Plexadd it to the library folder or import it
Voice, Smart AudioBook Player, Listen (Android)open the file or copy it to your audiobooks folder
VLC, Foobar2000plays it. VLC for iOS did not show the chapter list in testing, so use BookPlayer or Apple Books for chapters

Choose --format mp3 for players that don't read M4B (some car stereos). Audible and Kindle use closed formats and cannot import it.

Optional second engine: Pocket TTS

Pocket TTS (Kyutai, 100M parameters) is an optional second voice engine. In the author's small blind listening test (one listener) it was preferred for neutral English and its Italian was judged good. It is as fast as Kokoro on a laptop CPU (about 4x real time on an Apple M1), speaks English, Italian, French, German, Portuguese, Spanish and Dutch, has 27 built-in voices, and can clone a voice from a short clip. Kokoro stays the default.

bash
uv tool install claudio-audiobook --with pocket-tts      # or: pip install claudio-audiobook pocket-ttsclaudio-audiobook voices --engine pocketclaudio-audiobook build libro.md --engine pocket --lang it

Ask for it in chat: "use the pocket engine, in Italian". Differences from Kokoro, so nothing is silently ignored:

  • No speed, clause_pause or trim settings (asking for another speed is an error). The sentence and chapter pauses work.
  • voice is a catalogue name (alba, giovanni, ...) or the path of a clean 5 to 30 second clip to clone. Only clone a voice you have the right to use. Leave it out and each language gets its default voice (Italian: giovanni).
  • In Claude Desktop, use the separate claudio-audiobook-pocket extension (see Install). The standard extension installs only the default dependencies and does not include Pocket TTS.
  • Each language's model (about 400 MB) downloads once from Hugging Face the first time that language is used.
  • Pocket TTS weights are © Kyutai, licensed CC BY 4.0; the code is MIT.

54 voices, 9 languages

text
American English: af_heart, af_bella, af_nova, am_adam, am_michael, ...British English:  bf_emma, bf_isabella, bm_george, bm_lewis, ...Italian:          if_sara, im_nicolaSpanish:          ef_dora, em_alex          French: ff_siwisHindi, Japanese, Brazilian Portuguese, Mandarin Chinese ...

Blend two voices into a new one: --voice af_heart:0.6,bf_emma:0.4. List them all with claudio-audiobook voices.

Every setting

Available as MCP tool arguments, CLI flags, and (for the first five, and the author) defaults in the Desktop settings or the CLAUDIO_AUDIOBOOK_* environment variables.

SettingCLI flagValuesDefault
engine--enginekokoro (default) or pocket (optional, see below)kokoro
voice--voicea name (af_heart, bf_emma, im_nicola, … 54 voices, 9 languages) or a blend af_heart:0.6,af_sky:0.4af_heart
speed--speed0.5 to 2.01.0
language--langespeak code, e.g. de; lets a voice read another language with an accentthe voice's own
model--modelfull (best) or lite (92 MB, faster)full
format--formatm4b (chapters), mp3, wavm4b
sentence pause--sentence-pause0 to 5 seconds0.25
clause pause--clause-pause0 to 5 seconds (after commas, colons)0.1
chapter pause--chapter-pause0 to 30 seconds1.5
trim--no-trimcut silence at sentence ends, or keep ittrim
author--authorshown by players as the authorCLAUDIO_AUDIOBOOK_AUTHOR, else none
narrator--narratorshown as the narratorKokoro (<voice>)
cover--cover.jpg/.png path, none, or leave out to generate a title covergenerated
cover colours--cover-colors#top,#bottom for the generated coverpicked from the title
output folder-o / output_dirany folder~/Audiobooks/<title>

--dry-run shows the chapters and the estimated length without rendering. --force redoes everything. claudio-audiobook doctor checks the install.

How it works

text
 "create a python course"          │          ▼   Claude writes spoken-style markdown   ← the skill / prompt teaches it to write for the ear          │          ▼   MCP server: make_audiobook            ← runs as a detached job; survives a restart of Claude          │          ▼   Kokoro (ONNX) renders each chapter    ← local, resumable, voice blends, pauses          │          ▼   ffmpeg packs .m4b with chapter marks  ← bundled, nothing to install

Four MCP tools (make_audiobook, audiobook_status, list_voices, setup_check), a write_audiobook prompt and an audiobook skill. Works with any MCP client that can run a local stdio server.

Privacy

claudio-audiobook runs on your machine. Your text and audio are never uploaded, and there is no telemetry, no account and no API key.

It uses the network in two ways only: installing the package and its dependencies from PyPI (done by uv or pip), and a one-time download of the voice model: Kokoro from its GitHub release, checked against a SHA-256 sum, or, if you choose the optional Pocket engine, its model and voices from Hugging Face. It starts only its own programs: the bundled ffmpeg, a start-up check of the speech engine, and a background worker of this same package. It does not read or send credentials. Its settings are CLAUDIO_AUDIOBOOK_* environment variables, and only the home folder (~, $HOME) is ever expanded in a path.

FAQ

Does it cost anything? No. Claude itself is whatever plan you already have; the voice is free and local.

How good is the voice? Judge for yourself: listen to the sample. Kokoro is among the best small open TTS models, but it is not a human narrator. Expect clean, natural reading with occasional odd stress on unusual names.

Does it need a GPU? No. It runs on CPU.

Windows / Linux? The code is cross-platform and CI runs the tests. macOS is the tested path for Claude Desktop; Windows is not yet tested end to end. Reports welcome.

Can I use a different voice model? Point CLAUDIO_AUDIOBOOK_MODEL_FILE and CLAUDIO_AUDIOBOOK_VOICES_FILE at your own copy of the Kokoro files.

Contributing

Issues and PRs welcome, especially: Windows testing, new languages, and sample audiobooks. See CLAUDE.md for architecture and rules.

bash
uv venv --python 3.12 && uv pip install -e ".[dev]" && .venv/bin/pytest

If this saved you a subscription, a ⭐ helps others find it.

MIT. Voices by Kokoro via kokoro-onnx.

来源:README.md,提交 ff5832c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.2.0最新Oct 17, 2026
  2. v0.1.4Oct 17, 2026
  3. v0.1.3Oct 15, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分