We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7578992 commit 201276aCopy full SHA for 201276a
ctc_forced_aligner/alignment_utils.py
@@ -144,11 +144,13 @@ def generate_emissions(
144
emissions_ = model(input_batch).logits
145
emissions_arr.append(emissions_)
146
147
- emissions = torch.cat(emissions_arr, dim=0).flatten(0, 1)
+ emissions = torch.cat(emissions_arr, dim=0)
148
if context > 0:
149
emissions = emissions[
150
+ :,
151
time_to_frame(context_length) : -time_to_frame(context_length) + 1,
152
] # removing the context
153
+ emissions = emissions.flatten(0, 1)
154
155
if time_to_frame(extension / SAMPLING_FREQ) > 0:
156
emissions = emissions[: -time_to_frame(extension / SAMPLING_FREQ)]
0 commit comments