Skip to content

Commit

Permalink
Merge pull request #1541 from coqui-ai/comp_emb_fix
Browse files Browse the repository at this point in the history
Bug fix in compute embedding without eval partition
  • Loading branch information
Edresson authored Apr 27, 2022
2 parents 379ccd7 + 6233f4f commit 76b274e
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 76b274e

Please sign in to comment.