"""
"""
- preproc = self.process_pipe.results['irit_monopoly.segments'].data_object
- labels = self.process_pipe.results['irit_monopoly.segments'].label_metadata['label']
+ preproc = self.process_pipe.results.get_result_by_id('irit_monopoly.segments').data_object
+ labels = self.process_pipe.results.get_result_by_id('irit_monopoly.segments').label_metadata['label']
segments_monopoly = [(start, duration, labels[label])for start, duration, label in zip(preproc.time,
preproc.duration,
preproc.label)]
meandiff = N.mean(w1, axis = 0) - N.mean(w2, axis = 0)
invstdprod = 1. / (N.std(w1, axis = 0) * N.std(w2, axis = 0))
ret.append(N.sum(meandiff * meandiff * invstdprod))
-
+
return ret
# feature extraction defition
spec = yaafelib.FeaturePlan(sample_rate=16000)
spec.addFeature('mfccchop: MFCC CepsIgnoreFirstCoeff=0 blockSize=1024 stepSize=256')
- parent_analyzer = Yaafe(spec)
+ parent_analyzer = Yaafe(spec)
self.parents.append(parent_analyzer)
# informative parameters
return frames, eod
def post_process(self):
- mfcc = self.process_pipe.results['yaafe.mfccchop']['data_object']['value']
+ mfcc = self.process_pipe.results.get_result_by_id('yaafe.mfccchop')['data_object']['value']
sw = YaafeFrame(self.input_blocksize, self.input_stepsize, self.input_samplerate)
- pyannotefeat = SlidingWindowFeature(mfcc, sw)
+ pyannotefeat = SlidingWindowFeature(mfcc, sw)
# speech activity detection: usefull for debugging purpose only
# print 'adding sad res to result'
gdiff_win_size_frame = int(self.gdiff_win_size_sec / timestepsize)
min_seg_size_frame = int(self.min_seg_size_sec / timestepsize)
# print 'timestepsize %d, gdiffwinsize (sec: %f, frame: %d) , minsegsize (sec: %f, frame: %d)' % (timestepsize, self.gdiff_win_size_sec, gdiff_win_size_frame, self.min_seg_size_sec, min_seg_size_frame)
-
+
# basic gauss div
#bgd = (range(0, len(mfcc)), 'basicgdiv')