ttslearn.pretrained.retrieve_pretrained_model¶
-
ttslearn.pretrained.
retrieve_pretrained_model
(name)[source]¶ Retrieve pretrained model from local cache or download from GitHub.
- Parameters
name (str) – Name of pretrained model.
- Returns
Path to the pretrained model.
- Return type
- Raises
ValueError – If the pretrained model is not found.
Examples
>>> from ttslearn.pretrained import retrieve_pretrained_model >>> from ttslearn.contrib import Tacotron2PWGTTS >>> model_dir = retrieve_pretrained_model("tacotron2_pwg_jsut24k") >>> engine = Tacotron2PWGTTS(model_dir=model_dir, device="cpu") >>> wav, sr = engine.tts("センパイ、かっこいいです、ほれちゃいます!")