AlexHung29629 commited on
Commit
78918bc
·
verified ·
1 Parent(s): 80db0f5

Update ultravox_processing.py

Browse files
Files changed (1) hide show
  1. ultravox_processing.py +1 -1
ultravox_processing.py CHANGED
@@ -157,7 +157,7 @@ class UltravoxProcessor(transformers.ProcessorMixin):
157
  data["audio_values"] = x.input_features
158
  else:
159
  data["audio_values"] = x.input_values
160
- data["audio_len"] = x.attention_mask.sum(-1) - 1
161
 
162
  if text is not None:
163
  #assert isinstance(
 
157
  data["audio_values"] = x.input_features
158
  else:
159
  data["audio_values"] = x.input_values
160
+ data["audio_len"] = np.asarray(x.attention_mask).sum(-1) - 1
161
 
162
  if text is not None:
163
  #assert isinstance(