From 6233f4fcd739958e6f7ed25a99ba2dbc6fd821e2 Mon Sep 17 00:00:00 2001 From: Edresson Casanova Date: Tue, 26 Apr 2022 13:54:09 -0300 Subject: [PATCH] Bug fix in compute embedding without eval partition --- TTS/bin/compute_embeddings.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/TTS/bin/compute_embeddings.py b/TTS/bin/compute_embeddings.py index b62d603a49..c58123df4c 100644 --- a/TTS/bin/compute_embeddings.py +++ b/TTS/bin/compute_embeddings.py @@ -32,15 +32,19 @@ parser.add_argument( "--old_file", type=str, help="Previous speakers.json file, only compute for new audios.", default=None ) -parser.add_argument("--use_cuda", type=bool, help="flag to set cuda.", default=True) -parser.add_argument("--eval", type=bool, help="compute eval.", default=True) +parser.add_argument("--use_cuda", type=bool, help="flag to set cuda. Default False", default=False) +parser.add_argument("--no_eval", type=bool, help="Do not compute eval?. Default False", default=False) args = parser.parse_args() c_dataset = load_config(args.config_dataset_path) -meta_data_train, meta_data_eval = load_tts_samples(c_dataset.datasets, eval_split=args.eval) -wav_files = meta_data_train + meta_data_eval +meta_data_train, meta_data_eval = load_tts_samples(c_dataset.datasets, eval_split=not args.no_eval) + +if meta_data_eval is None: + wav_files = meta_data_train +else: + wav_files = meta_data_train + meta_data_eval encoder_manager = SpeakerManager( encoder_model_path=args.model_path,