AlexHung29629
commited on
Commit
•
57cd967
1
Parent(s):
d3c0181
Update ultravox_processing.py
Browse files- ultravox_processing.py +1 -1
ultravox_processing.py
CHANGED
@@ -140,7 +140,7 @@ class UltravoxProcessor(transformers.ProcessorMixin):
|
|
140 |
assert sampling_rate is not None, "Sampling rate must be provided."
|
141 |
audio_len = 30 * sampling_rate
|
142 |
else:
|
143 |
-
audio_len = max([a
|
144 |
# It's guaranteed that the number of frames is less than or equal to this amount.
|
145 |
# For Whisper this is exact AFAICT, but for Wav2Vec2 it's an upper bound.
|
146 |
# Currently, StackAudioFrames makes sure an over-estimation won't cause issues by padding the audio embeddings.
|
|
|
140 |
assert sampling_rate is not None, "Sampling rate must be provided."
|
141 |
audio_len = 30 * sampling_rate
|
142 |
else:
|
143 |
+
audio_len = max([len(a) for a in audio])
|
144 |
# It's guaranteed that the number of frames is less than or equal to this amount.
|
145 |
# For Whisper this is exact AFAICT, but for Wav2Vec2 it's an upper bound.
|
146 |
# Currently, StackAudioFrames makes sure an over-estimation won't cause issues by padding the audio embeddings.
|