Skip to content

Commit

Permalink
[cli] add seed to prevent randomization of results (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdfjy authored Jan 31, 2024
1 parent 8a80d2f commit 5efdd48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wespeaker/cli/speaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5efdd48

Please sign in to comment.