Skip to content

Commit 5ce3729

Browse files
committed
minor
1 parent 06b944c commit 5ce3729

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

speechbrain/processing/diarization.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,14 +1145,16 @@ def do_AHC(diary_obj, out_rttm_file, rec_id, k_oracle=4, p_val=0.3):
11451145

11461146
from sklearn.cluster import AgglomerativeClustering
11471147

1148+
# p_val --> threshold_val (for AHC)
1149+
11481150
if k_oracle is not None:
1149-
print("ORACLE SPKRs")
1151+
print("ORACLE SPKRs...")
11501152
num_of_spk = k_oracle
11511153
clustering = AgglomerativeClustering(
11521154
n_clusters=num_of_spk, affinity="cosine", linkage="ward"
11531155
).fit(diary_obj.stat1)
11541156
labels = clustering.labels_
1155-
print("labels.shape (Ora.) = ", labels.shape)
1157+
print("labels.shape (Oracle) = ", labels.shape)
11561158
else:
11571159
print("Using AHC threshold pval = ", p_val)
11581160
# Estimate num of using max eigen gap with `cos` affinity matrix.
@@ -1164,7 +1166,7 @@ def do_AHC(diary_obj, out_rttm_file, rec_id, k_oracle=4, p_val=0.3):
11641166
distance_threshold=p_val,
11651167
).fit(diary_obj.stat1)
11661168
labels = clustering.labels_
1167-
print("labels.shape (Est.) = ", labels.shape)
1169+
print("labels.shape (Estima) = ", labels.shape)
11681170

11691171
# Convert labels to speaker boundaries
11701172
subseg_ids = diary_obj.segset

0 commit comments

Comments
 (0)