Upload KotobaWhisperPipeline
Browse files- kotoba_whisper.py +1 -1
kotoba_whisper.py
CHANGED
@@ -216,7 +216,7 @@ class KotobaWhisperPipeline(AutomaticSpeechRecognitionPipeline):
|
|
216 |
item["is_last"] = m == len(timelines) - 1 and n == len(labels) - 1 and item["is_last"]
|
217 |
yield item
|
218 |
else:
|
219 |
-
if
|
220 |
processed = self.feature_extractor(
|
221 |
audio_array,
|
222 |
sampling_rate=self.feature_extractor.sampling_rate,
|
|
|
216 |
item["is_last"] = m == len(timelines) - 1 and n == len(labels) - 1 and item["is_last"]
|
217 |
yield item
|
218 |
else:
|
219 |
+
if audio_array.shape[0] > self.feature_extractor.n_samples:
|
220 |
processed = self.feature_extractor(
|
221 |
audio_array,
|
222 |
sampling_rate=self.feature_extractor.sampling_rate,
|