mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
bd9c10f9f1
commit
552f89adee
Binary file not shown.
@ -191,7 +191,15 @@ def encode_supervisions(
|
||||
returned tensor and list of strings are guaranteed to be consistent with
|
||||
each other.
|
||||
"""
|
||||
try: start_frame = supervisions["start_frame"]
|
||||
except: start_frame = [0 for i in range(len(supervisions["cut"]))]
|
||||
|
||||
try: num_frames = supervisions["num_frames"]
|
||||
except:
|
||||
num_frames = []
|
||||
for supervision in supervisions['cut']:
|
||||
try: num_frames.append(supervision.tracks[0].cut.recording.num_samples)
|
||||
except: num_frames.append(supervision.recording.num_samples)
|
||||
supervision_segments = torch.stack(
|
||||
(
|
||||
supervisions["sequence_idx"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user