mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-09 17:14:20 +00:00
Update egs/librispeech/ASR/pruned_transducer_stateless6/hubert_xlarge.py
Co-authored-by: Fangjun Kuang <csukuangfj@gmail.com>
This commit is contained in:
parent
91432397cf
commit
6fff82b917
@ -178,9 +178,7 @@ class HubertXlargeFineTuned:
|
|||||||
N = encoder_embedding.shape[0]
|
N = encoder_embedding.shape[0]
|
||||||
assert len(cut_list) == N
|
assert len(cut_list) == N
|
||||||
# 320 is from: 16,000 / 50 = sample_rate / hbuert output frame rate
|
# 320 is from: 16,000 / 50 = sample_rate / hbuert output frame rate
|
||||||
num_frames = [
|
num_frames = (supervisions["num_samples"] // 320).tolist()
|
||||||
supervisions["num_samples"][i].item() // 320 for i in range(N)
|
|
||||||
]
|
|
||||||
return encoder_embedding, num_frames
|
return encoder_embedding, num_frames
|
||||||
|
|
||||||
def ctc_greedy_search(self, batch):
|
def ctc_greedy_search(self, batch):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user