mirror of
https://github.com/shivammehta25/Matcha-TTS.git
synced 2026-02-04 09:49:21 +08:00
Custom checkpoint possibility
This commit is contained in:
@@ -182,6 +182,12 @@ python matcha/train.py experiment=ljspeech_min_memory
|
||||
python matcha/train.py experiment=ljspeech trainer.devices=[0,1]
|
||||
```
|
||||
|
||||
6. Synthesise from the custom trained model
|
||||
|
||||
```bash
|
||||
matcha_tts --text "<INPUT TEXT>" --checkpoint_path <PATH TO CHECKPOINT>
|
||||
```
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Since this code uses: [Lightning-Hydra-Template](https://github.com/ashleve/lightning-hydra-template), you have all the powers that comes with it.
|
||||
|
||||
@@ -155,6 +155,14 @@ def cli():
|
||||
help="Model to use",
|
||||
choices=MATCHA_URLS.keys(),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--checkpoint_path",
|
||||
type=str,
|
||||
default=None,
|
||||
help="Path to the custom model checkpoint",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--vocoder",
|
||||
type=str,
|
||||
@@ -201,6 +209,11 @@ def cli():
|
||||
print_config(args)
|
||||
paths = assert_required_models_available(args)
|
||||
|
||||
if args.checkpoint_path is not None:
|
||||
print(f"[🍵] Loading custom model from {args.checkpoint_path}")
|
||||
paths["matcha"] = args.checkpoint_path
|
||||
args.model = "custom_model"
|
||||
|
||||
model = load_matcha(args.model, paths["matcha"], device)
|
||||
vocoder, denoiser = load_vocoder(args.vocoder, paths["vocoder"], device)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user