Matcha-TTS: A fast TTS architecture with conditional flow matching
Paper
•
2309.03199
•
Published
•
14
Trained with Matcha-TTS(Not my work,I just converted to onnx) - Github | Paper
How to Infer see Github page
You have to follow the cc-by-4.0 vctk license.
These tools did not effect output license.
I release my output under MIT License.If you want your license ,convert it by yourself
All models are simplify(If you need original,export by yourself)
Vocoder:hifigan_univ_v1(some english speaker avoid robotic)
Vocoder:hifigan_T2_v1(Good for English)
see Matcha-TTS ONNX export
python -m matcha.onnx.export matcha_vctk.ckpt vctk_t2.onnx --vocoder-name "hifigan_T2_v1" --vocoder-checkpoint "generator_v1"
from onnxsim import simplify
import onnx
import argparse
parser = argparse.ArgumentParser(
description="create simplify onnx"
)
parser.add_argument(
"--input","-i",
type=str,required=True
)
parser.add_argument(
"--output","-o",
type=str
)
args = parser.parse_args()
src_model_path = args.input
if args.output == None:
dst_model_path = src_model_path.replace(".onnx","_simplify.onnx")
else:
dst_model_path = args.output
model = onnx.load(src_model_path)
model_simp, check = simplify(model)
onnx.save(model_simp, dst_model_path)
from onnxruntime.quantization import quantize_dynamic, QuantType
import argparse
parser = argparse.ArgumentParser(
description="create quantized onnx"
)
parser.add_argument(
"--input","-i",
type=str,required=True
)
parser.add_argument(
"--output","-o",
type=str
)
args = parser.parse_args()
src_model_path = args.input
if args.output == None:
dst_model_path = src_model_path.replace(".onnx","_q8.onnx")
else:
dst_model_path = args.output
# only QUInt8 works well
quantized_model = quantize_dynamic(src_model_path, dst_model_path, weight_type=QuantType.QUInt8)