pool = Pool() startTime = float(opt.startTime) endTime = float(opt.endTime) # compute descriptors readMetadata(input_file, pool) INFO('Process step 1: Replay Gain') replaygain.compute(input_file, pool, startTime, endTime) segments_namespace=[] if opt.segmentation: INFO('Process step 2: Low Level') computeLowLevel(input_file, pool, startTime, endTime) segmentation.compute(input_file, pool, startTime, endTime) segments = pool['segmentation.timestamps'] for i in xrange(len(segments)-1): startTime = segments[i] endTime = segments[i+1] INFO('**************************************************************************') INFO('Segment ' + str(i) + ': processing audio from ' + str(startTime) + 's to ' + str(endTime) + 's') INFO('**************************************************************************') # set segment name: segment_name = 'segment_'+ str(i) pool.set('segments.'+segment_name+'.name', segment_name) # set segment scope: pool.set('segments.'+segment_name+'.scope', numpy.array([startTime, endTime])) # compute descriptors:
pool = Pool() startTime = float(opt.startTime) endTime = float(opt.endTime) # compute descriptors readMetadata(input_file, pool) INFO('Process step 1: Replay Gain') replaygain.compute(input_file, pool, startTime, endTime) segments_namespace = [] if opt.segmentation: INFO('Process step 2: Low Level') computeLowLevel(input_file, pool, startTime, endTime) segmentation.compute(input_file, pool, startTime, endTime) segments = pool['segmentation.timestamps'] for i in xrange(len(segments) - 1): startTime = segments[i] endTime = segments[i + 1] INFO( '**************************************************************************' ) INFO('Segment ' + str(i) + ': processing audio from ' + str(startTime) + 's to ' + str(endTime) + 's') INFO( '**************************************************************************' ) # set segment name: