Update custom model files, README, and requirements
Browse files- asr_pipeline.py +1 -1
asr_pipeline.py
CHANGED
|
@@ -491,7 +491,7 @@ class ASRPipeline(transformers.AutomaticSpeechRecognitionPipeline):
|
|
| 491 |
# 2. REMOVE REPETITIVE LOOPS
|
| 492 |
# If the model repeats the same phrase, keep only one instance.
|
| 493 |
words = text.split()
|
| 494 |
-
for n in range(1, min(
|
| 495 |
last_sequence = words[-n:]
|
| 496 |
repeat_count = 0
|
| 497 |
idx = len(words) - n
|
|
|
|
| 491 |
# 2. REMOVE REPETITIVE LOOPS
|
| 492 |
# If the model repeats the same phrase, keep only one instance.
|
| 493 |
words = text.split()
|
| 494 |
+
for n in range(1, min(15, len(words) // 2 + 1)):
|
| 495 |
last_sequence = words[-n:]
|
| 496 |
repeat_count = 0
|
| 497 |
idx = len(words) - n
|