Metadata-Version: 2.4
Name: rapidtts
Version: 1.0.0
Summary: A text-to-speech framework for fast and high-quality speech synthesis.
Home-page: https://github.com/RapidAI/RapidTTS
Author: SWHL
Author-email: liekkaskono@163.com
License: Apache-2.0
Keywords: tts,rapidtts,melotts
Platform: Any
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9,<4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cn2an<1.0,>=0.5.22
Requires-Dist: g2p_en<3.0,>=2.1.0
Requires-Dist: jieba<1.0,>=0.42.1
Requires-Dist: librosa<1.0,>=0.11.0
Requires-Dist: numpy>=1.22.3
Requires-Dist: onnxruntime<1.21,>=1.18.0; python_version < "3.10"
Requires-Dist: onnxruntime<2.0,>=1.21.0; python_version >= "3.10"
Requires-Dist: pypinyin<1.0,>=0.50.0
Requires-Dist: soundfile<1.0,>=0.12.1
Requires-Dist: tokenizers<1.0,>=0.13.3
Requires-Dist: omegaconf<3.0,>=2.3.0
Requires-Dist: colorlog<7.0,>=6.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# RapidTTS

RapidTTS 是一个轻量级文本转语音工具，面向本地快速推理。当前默认后端是导出为 ONNX 的 MeloTTS。

## 安装

```bash
pip install rapidtts
```

从源码安装：

```bash
git clone https://github.com/RapidAI/RapidTTS.git
cd RapidTTS
pip install -e .
```

## 快速使用

命令行合成：

```bash
rapidtts text "你好，RapidTTS" outputs/1.wav
```

Python 调用：

```python
from rapidtts import RapidTTS, SynthesisRequest, TTSModel

tts = RapidTTS(model=TTSModel.MELO_ONNX)
resp = tts.synthesize(SynthesisRequest(text="你好，RapidTTS"))
resp.save("outputs/1.wav")
```

## 常用命令

```bash
rapidtts download melo_onnx
rapidtts check
rapidtts text "你好，RapidTTS" outputs/1.wav
```

## 模型文件

默认模型文件会在未指定模型目录时下载到库安装目录下，并使用 `models.yaml` 中声明的 SHA256 进行校验。

自定义下载目录：

```bash
rapidtts download melo_onnx --save-dir /path/to/melotts_zh_mix_en_onnx
```

自定义推理模型目录：

```bash
rapidtts text "你好，RapidTTS" outputs/1.wav --model-dir /path/to/melotts_zh_mix_en_onnx
```

## License

RapidTTS 使用 Apache-2.0 License。
