Gamaliel Espinoza Macedo 6 anni fa
parent
commit
931d457b85
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 1 1
      ondemand/__init__.py
  2. 4 1
      ondemand/service.py

+ 1 - 1
ondemand/__init__.py

@@ -1 +1 @@
-__version__ = '1.3.0-rc1'
+__version__ = '1.3.0-rc2'

+ 4 - 1
ondemand/service.py

@@ -191,6 +191,7 @@ def process_segment(item, audios=None):
     for path, name, ts in audios_iterable:
         log.info('file: {}'.format(path))
         audios_counter += os.path.isfile(path)
+        values = []
         for match in dejavu.recognize(recognizer, path, 5,
                                       ads_filter=[md5hash]):
             try:
@@ -199,11 +200,13 @@ def process_segment(item, audios=None):
                     'timestamp': ts,
                     'offset': match['offset']
                 })
-                log.info("{} {}".format(ts, match['confidence']))
+                values.append(match['confidence'])
             except KeyError as ex:
                 log.error(str(ex))
 
             ts += match['length'] / 1000
+
+        log.info(values)
     
     try:
         response = client.put_schedule_results(