Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,84 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-4.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
datasets:
|
| 4 |
+
- CSTR-Edinburgh/vctk
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
---
|
| 8 |
+
Trained with Matcha-TTS - [Github](https://github.com/shivammehta25/Matcha-TTS) | [Paper](https://arxiv.org/abs/2309.03199)
|
| 9 |
+
|
| 10 |
+
How to Infer see [Github page](https://github.com/akjava/Matcha-TTS-Japanese/tree/main/examples)
|
| 11 |
+
## License
|
| 12 |
+
You must abide by cc-by-4.0 vctk license.
|
| 13 |
+
### Datasets License
|
| 14 |
+
- VCTK Dataset license are cc-by-4.0
|
| 15 |
+
### Tools License
|
| 16 |
+
|
| 17 |
+
These tools did not effect output license.
|
| 18 |
+
|
| 19 |
+
- Matcha-TTS - MIT
|
| 20 |
+
- ONNX Simplifier - Apache2.0
|
| 21 |
+
- onnxruntime - MIT
|
| 22 |
+
### Converted model Owner(me)
|
| 23 |
+
I release my output under MIT License.If you want your license ,convert it by yourself
|
| 24 |
+
|
| 25 |
+
## How to Convert
|
| 26 |
+
### Export Model
|
| 27 |
+
see Matcha-TTS [ONNX export](https://github.com/shivammehta25/Matcha-TTS)
|
| 28 |
+
### simplify model
|
| 29 |
+
```
|
| 30 |
+
from onnxsim import simplify
|
| 31 |
+
import onnx
|
| 32 |
+
|
| 33 |
+
import argparse
|
| 34 |
+
parser = argparse.ArgumentParser(
|
| 35 |
+
description="create simplify onnx"
|
| 36 |
+
)
|
| 37 |
+
parser.add_argument(
|
| 38 |
+
"--input","-i",
|
| 39 |
+
type=str,required=True
|
| 40 |
+
)
|
| 41 |
+
parser.add_argument(
|
| 42 |
+
"--output","-o",
|
| 43 |
+
type=str
|
| 44 |
+
)
|
| 45 |
+
args = parser.parse_args()
|
| 46 |
+
|
| 47 |
+
src_model_path = args.input
|
| 48 |
+
if args.output == None:
|
| 49 |
+
dst_model_path = src_model_path.replace(".onnx","_simplify.onnx")
|
| 50 |
+
else:
|
| 51 |
+
dst_model_path = args.output
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
model = onnx.load(src_model_path)
|
| 55 |
+
model_simp, check = simplify(model)
|
| 56 |
+
|
| 57 |
+
onnx.save(model_simp, dst_model_path)
|
| 58 |
+
```
|
| 59 |
+
### quantize model
|
| 60 |
+
```
|
| 61 |
+
from onnxruntime.quantization import quantize_dynamic, QuantType
|
| 62 |
+
import argparse
|
| 63 |
+
parser = argparse.ArgumentParser(
|
| 64 |
+
description="create quantized onnx"
|
| 65 |
+
)
|
| 66 |
+
parser.add_argument(
|
| 67 |
+
"--input","-i",
|
| 68 |
+
type=str,required=True
|
| 69 |
+
)
|
| 70 |
+
parser.add_argument(
|
| 71 |
+
"--output","-o",
|
| 72 |
+
type=str
|
| 73 |
+
)
|
| 74 |
+
args = parser.parse_args()
|
| 75 |
+
|
| 76 |
+
src_model_path = args.input
|
| 77 |
+
if args.output == None:
|
| 78 |
+
dst_model_path = src_model_path.replace(".onnx","_q8.onnx")
|
| 79 |
+
else:
|
| 80 |
+
dst_model_path = args.output
|
| 81 |
+
|
| 82 |
+
# only QUInt8 works well
|
| 83 |
+
quantized_model = quantize_dynamic(src_model_path, dst_model_path, weight_type=QuantType.QUInt8)
|
| 84 |
+
```
|