MCPcopy Create free account
hub / github.com/modelscope/FunASR / correct_labels

Function correct_labels

funasr/utils/speaker_utils.py:178–192  ·  view source on GitHub ↗

Correct labels. Args: labels: TODO.

(labels)

Source from the content-addressed store, hash-verified

176
177
178def correct_labels(labels):
179 """Correct labels.
180
181 Args:
182 labels: TODO.
183 """
184 labels_id = 0
185 id2id = {}
186 new_labels = []
187 for i in labels:
188 if i not in id2id:
189 id2id[i] = labels_id
190 labels_id += 1
191 new_labels.append(id2id[i])
192 return np.array(new_labels)
193
194
195def merge_seque(distribute_res):

Callers 1

postprocessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…