pip install melotts-plus
python -m unidic downloadfrom meloplus import MeloInference
# Speed is adjustable
speed = 1.0
# English
text = "Did you ever hear a folk tale about a giant turtle?"
model = MeloInference(language="EN", device="auto")
speaker_ids = model.hps.data.spk2id
# American accent
output_path = "en-us.wav"
model.tts_to_file(text, speaker_ids["EN-US"], output_path, speed=speed)pip install pre-commit
pre-commit install
pre-commit run --all-filesThis project is licensed under the terms of the MIT License.
@software{zhao2024melo,
author={Zhao, Wenliang and Yu, Xumin and Qin, Zengyi},
title = {MeloTTS: High-quality Multi-lingual Multi-accent Text-to-Speech},
url = {https://github.com/myshell-ai/MeloTTS},
year = {2023}
}