Update README.md
Browse files
README.md
CHANGED
@@ -20,7 +20,7 @@ https://github.com/akjava/Matcha-TTS-Japanese
|
|
20 |
Matcha-TTS checkpoint - epoch seems big but train with only 290 audios
|
21 |
### ONNX
|
22 |
|
23 |
-
onnx simplified
|
24 |
```
|
25 |
from onnxsim import simplify
|
26 |
import onnx
|
@@ -30,9 +30,25 @@ model_simp, check = simplify(model)
|
|
30 |
|
31 |
onnx.save(model_simp, "en001_6399_T2_simplify.onnx")
|
32 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
- T2 means Vocoder is hifigan_T2_v1
|
34 |
- Unif means Voder is hifigan_univ_v1
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
To use onnx need something,I'll add sample code later
|
37 |
### Audio
|
38 |
I cut with VAD tools and denoise with resemble-enhance
|
|
|
20 |
Matcha-TTS checkpoint - epoch seems big but train with only 290 audios
|
21 |
### ONNX
|
22 |
|
23 |
+
onnx simplified loading speed is now 1.5 times faster.
|
24 |
```
|
25 |
from onnxsim import simplify
|
26 |
import onnx
|
|
|
30 |
|
31 |
onnx.save(model_simp, "en001_6399_T2_simplify.onnx")
|
32 |
```
|
33 |
+
|
34 |
+
timesteps is default(5) ,small time steps ;The infer speed is somewhat faster, but the quality is lower.
|
35 |
+
|
36 |
+
If you need original onnx do like official way
|
37 |
+
```
|
38 |
+
python -m matcha.onnx.export checkpoint_epoch=5699.ckpt en001_5699t2.onnx --vocoder-name hifigan_T2_v1 --n-timesteps 5 --vocoder-checkpoint generator_v1
|
39 |
+
python -m matcha.onnx.export checkpoint_epoch=5699.ckpt en001_5699.onnx --vocoder-name hifigan_univ_v1 --n-timesteps 5 --vocoder-checkpoint g_02500000
|
40 |
+
```
|
41 |
+
|
42 |
- T2 means Vocoder is hifigan_T2_v1
|
43 |
- Unif means Voder is hifigan_univ_v1
|
44 |
|
45 |
+
you can quantize this onnx,but 3 times smaller, but 4-5 times slower,that why I did't include that.
|
46 |
+
```
|
47 |
+
from onnxruntime.quantization import quantize_dynamic, QuantType
|
48 |
+
quantized_model = quantize_dynamic(src_model_path, dst_model_path, weight_type=QuantType.QUInt8)
|
49 |
+
```
|
50 |
+
|
51 |
+
|
52 |
To use onnx need something,I'll add sample code later
|
53 |
### Audio
|
54 |
I cut with VAD tools and denoise with resemble-enhance
|