Skip to content

Commit

Permalink
Bug fix in compute embedding without eval partition
Browse files Browse the repository at this point in the history
  • Loading branch information
Edresson committed Apr 26, 2022
1 parent a41e860 commit 6233f4f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions TTS/bin/compute_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6233f4f

Please sign in to comment.