AlexHung29629
commited on
Update ultravox_processing.py
Browse files- 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(
|