self._aubio_pitch_analyzer = AubioPitch(blocksize_s=self.wLen,
stepsize_s=self.wStep)
- self.parents.append(self._aubio_pitch_analyzer)
+ self.parents['aubio_pitch'] = self._aubio_pitch_analyzer
@interfacedoc
def setup(self, channels=None, samplerate=None,
'''
aubio_res_id = 'aubio_pitch.pitch_confidence'
- pipe_results = self.process_pipe.results
- pitch_confidences = pipe_results.get_result_by_id(aubio_res_id).data
+ aubio_uuid = self.parents['aubio_pitch'].uuid()
+ aubio_results = self.process_pipe.results[aubio_uuid]
+
+ pitch_confidences = aubio_results[aubio_res_id].data
nb_frameDecision = int(self.decisionLen / self.wStep)
epsilon = numpy.spacing(pitch_confidences[0])
conf.id_metadata.name += ' ' + 'Yin Confidence'
conf.data_object.value = pitch_confidences
- self.process_pipe.results.add(conf)
+ self.add_result(conf)
convert = {False: 0, True: 1}
label = {0: 'Poly', 1: 'Mono'}
segs.data_object.duration = [(float(s[1] - s[0]+1) * self.decisionLen)
for s in segList]
- self.process_pipe.results.add(segs)
+ self.add_result(segs)
return
def monoLikelihood(self, m, v):
for s in segsList]
segs.data_object.duration = [(float(s[1] - s[0]) * step)
for s in segsList]
- self.process_pipe.results.add(segs)
+ self.add_result(segs)
def release(self):
self._buffer.close()
modEnergy.data_object.value = conf
- self.process_pipe.results.add(modEnergy)
+ self.add_result(modEnergy)
# Segment
convert = {False: 0, True: 1}
self.samplerate())
for s in segList]
- self.process_pipe.results.add(segs)
+ self.add_result(segs)
# Median filter on decision
segs = self.new_result(data_mode='label', time_mode='segment')
self.samplerate())
for s in segList_filt]
- self.process_pipe.results.add(segs)
+ self.add_result(segs)
conf.id_metadata.name += ' ' + 'Confidence'
conf.data_object.value = confEntropy
- self.process_pipe.results.add(conf)
+ self.add_result(conf)
# Binary Entropy
binaryEntropy = modulentropy > self.threshold
self.samplerate())
for s in segList]
- self.process_pipe.results.add(segs)
+ self.add_result(segs)
return
'mfccd2: MFCC CepsIgnoreFirstCoeff=0 blockSize=1024 stepSize=256 > Derivate DOrder=2')
spec.addFeature('zcr: ZCR blockSize=1024 stepSize=256')
parent_analyzer = get_processor('yaafe')(spec)
- self.parents.append(parent_analyzer)
+ self.parents['yaafe'] = parent_analyzer
# informative parameters
# these are not really taken into account by the system
return frames, eod
def post_process(self):
- yaafe_result = self.process_pipe.results
- mfcc = yaafe_result.get_result_by_id(
- 'yaafe.mfcc')['data_object']['value']
- mfccd1 = yaafe_result.get_result_by_id(
- 'yaafe.mfccd1')['data_object']['value']
- mfccd2 = yaafe_result.get_result_by_id(
- 'yaafe.mfccd2')['data_object']['value']
- zcr = yaafe_result.get_result_by_id(
- 'yaafe.zcr')['data_object']['value']
+ yaafe_result = self.process_pipe.results[self.parents['yaafe'].uuid()]
+ mfcc = yaafe_result['yaafe.mfcc']['data_object']['value']
+ mfccd1 = yaafe_result['yaafe.mfccd1']['data_object']['value']
+ mfccd2 = yaafe_result['yaafe.mfccd2']['data_object']['value']
+ zcr = yaafe_result['yaafe.zcr']['data_object']['value']
features = np.concatenate((mfcc, mfccd1, mfccd2, zcr), axis=1)
sad_result.id_metadata.name += ' ' + \
'Speech Activity Detection Log Likelihood Difference'
sad_result.data_object.value = res
- self.process_pipe.results.add(sad_result)
+ self.add_result(sad_result)