From 5efdd481e01a4ca53197f86814c8a128b3defeb6 Mon Sep 17 00:00:00 2001 From: srdfjy <66103286+srdfjy@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:49:27 +0800 Subject: [PATCH] [cli] add seed to prevent randomization of results (#270) --- wespeaker/cli/speaker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wespeaker/cli/speaker.py b/wespeaker/cli/speaker.py index 47130b7f..476772f1 100644 --- a/wespeaker/cli/speaker.py +++ b/wespeaker/cli/speaker.py @@ -32,11 +32,14 @@ from wespeaker.diar.spectral_clusterer import cluster from wespeaker.diar.extract_emb import subsegment from wespeaker.diar.make_rttm import merge_segments +from wespeaker.utils.utils import set_seed class Speaker: def __init__(self, model_dir: str): + set_seed() + config_path = os.path.join(model_dir, 'config.yaml') model_path = os.path.join(model_dir, 'avg_model.pt') with open(config_path, 'r') as fin: