mirror of https://github.com/coqui-ai/TTS.git
Add eval_split and eval_split_size in the call of load_tts_samples for all recipes
This commit is contained in:
parent
2e6e8f651d
commit
01e7cba5bf
|
@ -49,7 +49,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init model
|
# init model
|
||||||
model = AlignTTS(config, ap, tokenizer)
|
model = AlignTTS(config, ap, tokenizer)
|
||||||
|
|
|
@ -84,7 +84,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init the model
|
# init the model
|
||||||
model = ForwardTTS(config, ap, tokenizer, speaker_manager=None)
|
model = ForwardTTS(config, ap, tokenizer, speaker_manager=None)
|
||||||
|
|
|
@ -83,7 +83,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init the model
|
# init the model
|
||||||
model = ForwardTTS(config, ap, tokenizer)
|
model = ForwardTTS(config, ap, tokenizer)
|
||||||
|
|
|
@ -60,7 +60,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# INITIALIZE THE MODEL
|
# INITIALIZE THE MODEL
|
||||||
# Models take a config object and a speaker manager as input
|
# Models take a config object and a speaker manager as input
|
||||||
|
|
|
@ -67,7 +67,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init model
|
# init model
|
||||||
model = ForwardTTS(config, ap, tokenizer)
|
model = ForwardTTS(config, ap, tokenizer)
|
||||||
|
|
|
@ -77,7 +77,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# INITIALIZE THE MODEL
|
# INITIALIZE THE MODEL
|
||||||
# Models take a config object and a speaker manager as input
|
# Models take a config object and a speaker manager as input
|
||||||
|
|
|
@ -74,7 +74,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# INITIALIZE THE MODEL
|
# INITIALIZE THE MODEL
|
||||||
# Models take a config object and a speaker manager as input
|
# Models take a config object and a speaker manager as input
|
||||||
|
|
|
@ -69,7 +69,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init model
|
# init model
|
||||||
model = Vits(config, ap, tokenizer, speaker_manager=None)
|
model = Vits(config, ap, tokenizer, speaker_manager=None)
|
||||||
|
|
|
@ -109,7 +109,7 @@ config.from_dict(config.to_dict())
|
||||||
ap = AudioProcessor(**config.audio.to_dict())
|
ap = AudioProcessor(**config.audio.to_dict())
|
||||||
|
|
||||||
# load training samples
|
# load training samples
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it maps speaker-id to speaker-name in the model and data-loader
|
# it maps speaker-id to speaker-name in the model and data-loader
|
||||||
|
|
|
@ -71,7 +71,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it maps speaker-id to speaker-name in the model and data-loader
|
# it maps speaker-id to speaker-name in the model and data-loader
|
||||||
|
|
|
@ -69,7 +69,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it maps speaker-id to speaker-name in the model and data-loader
|
# it maps speaker-id to speaker-name in the model and data-loader
|
||||||
|
|
|
@ -69,7 +69,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it maps speaker-id to speaker-name in the model and data-loader
|
# it maps speaker-id to speaker-name in the model and data-loader
|
||||||
|
|
|
@ -69,7 +69,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it maps speaker-id to speaker-name in the model and data-loader
|
# it maps speaker-id to speaker-name in the model and data-loader
|
||||||
|
|
|
@ -72,7 +72,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it mainly handles speaker-id to speaker-name for the model and the data-loader
|
# it mainly handles speaker-id to speaker-name for the model and the data-loader
|
||||||
|
|
|
@ -78,7 +78,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it mainly handles speaker-id to speaker-name for the model and the data-loader
|
# it mainly handles speaker-id to speaker-name for the model and the data-loader
|
||||||
|
|
|
@ -78,7 +78,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it mainly handles speaker-id to speaker-name for the model and the data-loader
|
# it mainly handles speaker-id to speaker-name for the model and the data-loader
|
||||||
|
|
|
@ -79,7 +79,7 @@ tokenizer, config = TTSTokenizer.init_from_config(config)
|
||||||
# You can define your custom sample loader returning the list of samples.
|
# You can define your custom sample loader returning the list of samples.
|
||||||
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
# Or define your custom formatter and pass it to the `load_tts_samples`.
|
||||||
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
# Check `TTS.tts.datasets.load_tts_samples` for more details.
|
||||||
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True)
|
train_samples, eval_samples = load_tts_samples(dataset_config, eval_split=True, eval_split_max_size=config.eval_split_max_size, eval_split_size=config.eval_split_size)
|
||||||
|
|
||||||
# init speaker manager for multi-speaker training
|
# init speaker manager for multi-speaker training
|
||||||
# it maps speaker-id to speaker-name in the model and data-loader
|
# it maps speaker-id to speaker-name in the model and data-loader
|
||||||
|
|
Loading…
Reference in New Issue