mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-08 16:44:20 +00:00
Merge branch 'stateless6' of github.com:glynpu/icefall into stateless6
This commit is contained in:
commit
f921a7be0e
@ -77,7 +77,7 @@ class HubertXlargeFineTuned:
|
||||
"""
|
||||
A wrapper of hubert extra large fine-tuned model.
|
||||
|
||||
A teacher model responsible for:
|
||||
A teacher model is responsible for:
|
||||
1. load teacher model
|
||||
2. extracting embeddings to train quantizer.
|
||||
3. extract codebook indices
|
||||
@ -196,9 +196,7 @@ class HubertXlargeFineTuned:
|
||||
N = encoder_embedding.shape[0]
|
||||
assert len(cut_list) == N
|
||||
# 320 is from: 16,000 / 50 = sample_rate / hbuert output frame rate
|
||||
num_frames = [
|
||||
supervisions["num_samples"][i].item() // 320 for i in range(N)
|
||||
]
|
||||
num_frames = (supervisions["num_samples"] // 320).tolist()
|
||||
return encoder_embedding, num_frames
|
||||
|
||||
def ctc_greedy_search(self, batch):
|
||||
|
Loading…
x
Reference in New Issue
Block a user