
Text to Speech
io.github.Engr-FaizanAli由 GitHub 帳號 Engr-FaizanAli 發布v0.4.1更新於 Oct 24, 2026
Reads text aloud locally on Windows, macOS, and Linux. No API key, account, or cloud service.
概覽
本機文字轉語音 MCP 伺服器,讓助理透過作業系統內建的語音引擎朗讀文字,不需 API 金鑰或雲端服務
- 可以做什麼
- 朗讀文字:提供 speak_text 一個工具,把傳入的字串(1 至 50,000 字元)交給本機語音合成器朗讀,播放結束後回傳。播放依先進先出排隊,一次只播一則,佇列長度有上限。預設使用系統內建引擎:Windows SAPI、macOS say,Linux 上為 espeak-ng。可透過設定選用其他後端(Piper、Transformers MMS、本機 HTTP 端點)。附帶一個助理朗讀技能,規定何時以及如何朗讀可見的進度更新和最終回答。
- 適用情境
- 適合希望助理在本機朗讀回答、使用者提供的文字、進度更新或無障礙內容的情境,且偏好離線、零成本的語音而非雲端 TTS 介面。
- 執行需求
- 以 PyPI 套件形式透過 stdio 在本機執行,通常用 uvx 啟動。需要 Python 3.10 或更新版本,以及支援 stdio 伺服器的 MCP 用戶端。Windows 和 macOS 不需額外安裝;Linux 需安裝 espeak-ng 和一個音訊播放器(如 alsa-utils)。選用後端需要各自的模型、執行檔、相依套件或端點。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Text to Speech,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Text to Speech MCP Server
[PyPI version] [Downloads] [Python versions] [License: MIT] [CI]
Give your AI assistant a voice — locally, with no API key, no account, and no cloud service.
Text to Speech is an open-source Model Context Protocol (MCP) server that lets AI assistants read text aloud on the user's computer. It uses the speech synthesizer already present on the host operating system, so nothing you ask it to say ever leaves your machine.
Runs on Windows, macOS, and Linux. Install is one line:
The server exposes one model-controlled tool:
Use it for user-provided text, assistant answers, accessibility workflows, or spoken progress updates while an agent works.
Why this one
Most text-to-speech MCP servers wrap a cloud API, which means an account, a key, per-character billing, and your text leaving the machine. This one uses the speech engine your operating system already ships, so it works offline, costs nothing, and keeps text local — which matters if you work anywhere that regulates where data may go.
It also ships an agent narration skill, so an assistant knows how to narrate, not just that it can.
Features
- Local playback through the platform's built-in synthesizer by default:
Windows SAPI, macOS
say, orespeak-ngon Linux. - No cloud API and no API key for the default setup.
- FIFO playback: concurrent requests are spoken one at a time, in order.
- Blocking tool completion: each call returns after its audio finishes.
- Bounded input and queue sizes to prevent unbounded resource use.
- Temporary generated WAV files are removed after playback by default.
- Standard MCP
stdiotransport through the official Python SDK. - Optional Piper, Transformers MMS, and local HTTP backends for advanced users.
The MCP server source is open source under the MIT License. Windows SAPI and the macOS
saycommand are proprietary components of their operating systems; they are not open-source speech engines.espeak-ngis separately licensed open-source software.
Requirements
- Python 3.10 or newer.
- An MCP client that supports stdio MCP servers.
uv/uvxis recommended for package-based MCP installation.
Per platform, for the zero-configuration default:
On Debian or Ubuntu that is typically:
Set TEXT_TO_SPEECH_BACKEND or TEXT_TO_SPEECH_PLAYER to override either
choice. If a required command is missing, the server reports which one and how
to install it rather than failing silently.
Install
Configure an MCP client to run the published PyPI package:
For MCP clients that accept command-based server configuration, use:
Some clients use TOML, JSON, or a graphical settings page. Use
uvx text-to-speech-mcp as the server command and restart the client after
changing its configuration.
Install from source
Then configure the client to run text-to-speech-mcp directly.
Prompt Examples
Read arbitrary text:
Read the final answer:
Read visible intermediate progress updates in order:
The text_to_speech portion is an example client-side server name. Clients may
display a different namespace while keeping the tool name speak_text.
Tool Contract
The tool is model-controlled under MCP. The user decides when to ask the model to call it, and the MCP client may show or require approval for tool calls.
Privacy
With any of the built-in backends, text is passed from the MCP client to a local
Python process and then to the operating system's speech components. It is not
sent to this project, an external API, or a cloud TTS provider. Generated WAV
files are written to a text-to-speech-mcp directory inside the system
temporary directory (%TEMP% on Windows, /tmp on macOS and Linux) and
deleted after playback unless TEXT_TO_SPEECH_KEEP_AUDIO=true is set.
The http backend is the exception: whether text leaves the machine depends
entirely on the endpoint you configure.
Do not ask an AI assistant to speak secrets, credentials, private keys, hidden reasoning, or sensitive tool output.
Optional Backends
The default requires no configuration. TEXT_TO_SPEECH_BACKEND is unset and the
server selects sapi, say, or espeak to match the host platform.
To pin one explicitly, or to use a backend that is not built into the OS, set
TEXT_TO_SPEECH_BACKEND to sapi, say, espeak, piper,
transformers_mms, or http. The last three require their own local model,
binary, Python dependencies, or endpoint. TEXT_TO_SPEECH_FALLBACK_BACKEND
names a second backend to try if the first fails. See
backend configuration.
Agent Narration Skill
A speech tool alone does not tell an assistant when or how to speak. Left to improvise, agents narrate hidden reasoning, skip the parts you actually needed, or read a paraphrase instead of what is on screen.
skills/project-tts-responder/SKILL.md
is a ready-made narration policy built on speak_text. Copy it into your
project's .claude/skills/ directory:
It also handles the parts that are easy to get wrong:
- Interactive questions are narrated before the picker opens. An interactive question tool is itself the pause, and its options live in the tool's parameters rather than in visible text — so any rule that narrates "once the options are visible" fires only after the user has already answered. This is the most common way narration silently fails.
- Speaks exactly what is on screen, never a paraphrase.
- Never speaks hidden reasoning, secrets, credentials, or raw tool output.
- One playback call per turn, never parallel, with defined behaviour when a call fails.
The skill applies when you ask for audio. To make a project narrate every response, say so in that project's own agent instructions — for example "narrate every response in Batch mode unless I opt out".
MCP Compatibility
- MCP transport:
stdio - MCP tool implementation: official Python MCP SDK
- Registry metadata:
server.jsonusing the 2025-12-11 schema - Package registry: PyPI
- Registry ownership marker: this README's
mcp-namecomment - Registry namespace:
io.github.Engr-FaizanAli/text-to-speech
License
MIT. See LICENSE.
來源:README.md,提交 6d20209
工具
0版本歷史
1- v0.4.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分