Browse Source

Less than 1 segment protecion

Gamaliel Espinoza 6 years ago
parent
commit
4e99b20f1a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ondemand/service.py

+ 3 - 0
ondemand/service.py

@@ -154,6 +154,9 @@ def find_repetitions(results, segments_needed=2):
     expect_space = False
     found = []
 
+    if segments_needed < 1:
+        segments_needed = 1
+
     for index, result in enumerate(results):
         if not expect_space:
             if result['confidence'] > threshold: