Upload 2 files
Browse files- README.md +107 -3
- requirements.txt +19 -0
README.md
CHANGED
|
@@ -1,3 +1,107 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: agpl-3.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: agpl-3.0
|
| 3 |
+
tags:
|
| 4 |
+
- rknn
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# MeloTTS-RKNN2
|
| 9 |
+
|
| 10 |
+
## (English README see below)
|
| 11 |
+
|
| 12 |
+
在RK3588上运行MeloTTS文字转语音模型!
|
| 13 |
+
|
| 14 |
+
- 推理速度(RK3588): 约5倍速
|
| 15 |
+
- 内存占用(RK3588): 约0.2GB
|
| 16 |
+
|
| 17 |
+
## 使用方法
|
| 18 |
+
|
| 19 |
+
1. 克隆或者下载此仓库到瑞芯微SoC的系统上.
|
| 20 |
+
|
| 21 |
+
2. 安装依赖
|
| 22 |
+
|
| 23 |
+
```bash
|
| 24 |
+
pip install -r requirements.txt
|
| 25 |
+
pip install rknn-toolkit-lite2
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
4. 运行
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
python melotts_rknn.py -s "你想要生成的文本"
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
## 模型转换
|
| 35 |
+
|
| 36 |
+
1. 安装依赖
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
+
pip install -r requirements.txt
|
| 40 |
+
pip install rknn-toolkit2==2.3.0
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
2. 转换模型
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
python convert_rknn.py
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## 已知问题
|
| 50 |
+
|
| 51 |
+
- 和原项目一样,Encoder部分并没有使用NPU加速,但是耗时不大,应该不会对推理速度有太大影响。
|
| 52 |
+
|
| 53 |
+
## 参考
|
| 54 |
+
|
| 55 |
+
- [melotts.axera](https://github.com/ml-inory/melotts.axera)
|
| 56 |
+
- [MeloTTS](https://github.com/myshell-ai/MeloTTS)
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
## English README
|
| 60 |
+
|
| 61 |
+
# MeloTTS-RKNN2
|
| 62 |
+
|
| 63 |
+
Run the MeloTTS text-to-speech model on RK3588!
|
| 64 |
+
|
| 65 |
+
- Inference speed (RK3588): about 5x real-time
|
| 66 |
+
- Memory usage (RK3588): about 0.2GB
|
| 67 |
+
|
| 68 |
+
## Usage
|
| 69 |
+
|
| 70 |
+
1. Clone or download this repository to your Rockchip SoC system.
|
| 71 |
+
|
| 72 |
+
2. Install dependencies
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
pip install -r requirements.txt
|
| 76 |
+
pip install rknn-toolkit-lite2
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
3. Run
|
| 80 |
+
|
| 81 |
+
```bash
|
| 82 |
+
python melotts_rknn.py -s "The text you want to generate."
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
## Model Conversion
|
| 86 |
+
|
| 87 |
+
1. Install dependencies
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
pip install -r requirements.txt
|
| 91 |
+
pip install rknn-toolkit2==2.3.0
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
2. Convert the model
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
python convert_rknn.py
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
## Known Issues
|
| 101 |
+
|
| 102 |
+
- Same as the original project, the Encoder part is not accelerated by the NPU. However, its processing time is short and should not significantly affect the inference speed.
|
| 103 |
+
|
| 104 |
+
## References
|
| 105 |
+
|
| 106 |
+
- [melotts.axera](https://github.com/ml-inory/melotts.axera)
|
| 107 |
+
- [MeloTTS](https://github.com/myshell-ai/MeloTTS)
|
requirements.txt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
numpy==1.24.4
|
| 2 |
+
onnx==1.16.0
|
| 3 |
+
onnxruntime==1.16.0
|
| 4 |
+
soundfile
|
| 5 |
+
cn2an
|
| 6 |
+
inflect==7.3.1
|
| 7 |
+
pykakasi==2.2.1
|
| 8 |
+
pypinyin==0.50.0
|
| 9 |
+
cn2an==0.5.22
|
| 10 |
+
g2p_en==2.1.0
|
| 11 |
+
g2pkk==0.1.2
|
| 12 |
+
jamo==0.4.1
|
| 13 |
+
jieba==0.42.1
|
| 14 |
+
librosa==0.9.1
|
| 15 |
+
MeCab==0.996.5
|
| 16 |
+
mecab_python3==1.0.9
|
| 17 |
+
num2words==0.5.12
|
| 18 |
+
unidic-lite==1.0.8
|
| 19 |
+
fugashi==1.4.0
|