Skip to content

Commit

Permalink
audio (#8134)
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Karpov <[email protected]>
Co-authored-by: Nikolay Karpov <[email protected]>
  • Loading branch information
karpnv and karpnv authored Jan 8, 2024
1 parent 9526584 commit f082947
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nemo/collections/asr/models/label_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,7 @@ def get_label(
np.random.seed(random_seed)
starts = np.random.randint(0, audio_length - duration + 1, size=num_segments)
for start in starts:
audio = audio[start : start + duration]

_, logits = self.infer_segment(audio)
_, logits = self.infer_segment(audio[start : start + duration])
label_id = logits.argmax(axis=1)
label_id_list.append(int(label_id[0]))

Expand Down

0 comments on commit f082947

Please sign in to comment.