Skip to main content

Illufly TTS - 模块化语音合成服务

高质量的模块化中文语音合成系统,支持多种部署方式。

特点

  • 模块化设计:可以按需安装客户端、服务端或完整包
  • 低资源需求:客户端几乎不需要额外依赖
  • 易于集成:可以直接复制API端点到其他应用
  • 多种部署:支持命令行、MCP协议和REST API接口

安装方式

1. 完整安装

包含所有组件,适合单机部署或完整服务:

pip install "illufly-tts[full]"

2. 仅客户端

轻量级安装,只包含客户端组件:

pip install "illufly-tts[client]"

3. 仅服务端

包含TTS核心服务:

pip install "illufly-tts[server]"

使用方式

完整服务(单机模式)

# 启动完整服务(包含API和TTS引擎)
python -m illufly_tts serve --voices-dir=./voices --device=cpu

拆分部署

# 在服务器上启动MCP服务
python -m illufly_tts server --voices-dir=./voices --device=cuda --transport=sse --port=31572

# 在客户端启动API服务
python -m illufly_tts api --server-host=tts-server-ip --server-port=31572

命令行客户端

# 通过命令行使用
python -m illufly_tts client speak --process-command="/usr/bin/python" --process-args="-m,illufly_tts,server" "你好世界"

# 获取可用语音
python -m illufly_tts client voices

集成到其他应用

from fastapi import FastAPI
from illufly_tts.api.endpoints import mount_tts_service

app = FastAPI()

# 添加自定义认证逻辑
async def get_current_user():
    # 实现你的认证逻辑
    return {"user_id": "my_user"}

# 挂载TTS服务
mount_tts_service(
    app=app,
    require_user=get_current_user,
    host="tts-server-host",  # 或使用子进程方式
    port=31572,
    prefix="/api/tts"
)

直接复制集成

如果你希望完全避免依赖,可以直接复制以下关键文件:

  1. src/illufly_tts/client/mcp_client.py - MCP客户端
  2. src/illufly_tts/api/endpoints.py - FastAPI端点

然后按照上面的集成示例整合到你的应用中。

更多信息

详细文档请参阅项目Wiki或API文档。

Metadata

Release files for illufly-tts 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for illufly-tts 0.2.1
File Size Uploaded Provenance Actions
illufly_tts-0.2.1.tar.gz 3.1 MB Without provenance Details for illufly_tts-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for illufly-tts 0.2.1
File Interpreter ABI Platform Actions
illufly_tts-0.2.1-py3-none-any.whl Python 3 none any Details for illufly_tts-0.2.1-py3-none-any.whl

Total release size: 6.1 MB

Release files / illufly_tts-0.2.1.tar.gz

Download URL illufly_tts-0.2.1.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
6d01033e48e768a6a2120ae6c7ef3726c12b4bf6cb7f98810661412ff352f3b9
BLAKE2b-256 checksum
How to use checksums
37e6270e79e2089dc7d72c9ba88cf690a1ca07722651958673670c628c04bbec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.0 Darwin/24.3.0

Release files / illufly_tts-0.2.1-py3-none-any.whl

Download URL illufly_tts-0.2.1-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e73b005d3f2ed2c1d3ecd5564df3a0f2f452cd80b7a6fd5be9b5e33e74a67b9a
BLAKE2b-256 checksum
How to use checksums
f2060333c0e47de2f190812e81c3669a2bde02d091c31886e6b2aad66f30b300
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.0 Darwin/24.3.0

Security for illufly-tts 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page