def getOutputs(self): """ Get output metadata. For each output feature, you get the following metadata: :sampleRate: audio analysis samplerate :sampleStep: Number of audio samples between consecutive feature values :frameLength: Analysis frame size in number of audio samples :size: size the feature (or number of coefficients) :parameters: attached parameters. """ res = {} oList = yc.engine_getOutputList(self.ptr) for outputname in iterPtrList(oList): ptr = yc.engine_getOutputInfos(self.ptr, outputname) infos = {} if ptr: infos['sampleRate'] = ptr.contents.sampleRate infos['sampleStep'] = ptr.contents.sampleStep infos['frameLength'] = ptr.contents.frameLength infos['size'] = ptr.contents.size infos['parameters'] = dict( (k, v) for k, v in iterPtrDict(ptr.contents.parameters)) yc.engine_freeIOInfos(ptr) res[outputname] = infos yc.engine_freeIOList(oList) return res
def getOutputs(self): """ Get output metadata. For each output feature, you get the following metadata: :sampleRate: audio analysis samplerate :sampleStep: Number of audio samples between consecutive feature values :frameLength: Analysis frame size in number of audio samples :size: size the feature (or number of coefficients) :parameters: attached parameters. """ res = {} oList = yc.engine_getOutputList(self.ptr) for outputname in iterPtrList(oList): ptr = yc.engine_getOutputInfos(self.ptr,outputname) infos = {} if ptr: infos['sampleRate'] = ptr.contents.sampleRate infos['sampleStep'] = ptr.contents.sampleStep infos['frameLength'] = ptr.contents.frameLength infos['size'] = ptr.contents.size infos['parameters'] = dict((k,v) for k,v in iterPtrDict(ptr.contents.parameters)) yc.engine_freeIOInfos(ptr) res[outputname] = infos yc.engine_freeIOList(oList) return res
def getInputs(self): """ Get input metadata. Result format is the same as for :py:meth:`getOutputs` method, but the general case is that there is only one input named 'audio' and the sole relevant metadata are: :sampleRate: expected audio sampleRate :parameters: attached parameters Others fields should be set to 1. """ res = {} iList = yc.engine_getInputList(self.ptr) for inputname in iterPtrList(iList): ptr = yc.engine_getInputInfos(self.ptr, inputname) infos = {} if ptr: infos['sampleRate'] = ptr.contents.sampleRate infos['sampleStep'] = ptr.contents.sampleStep infos['frameLength'] = ptr.contents.frameLength infos['size'] = ptr.contents.size infos['parameters'] = dict( (k, v) for k, v in iterPtrDict(ptr.contents.parameters)) yc.engine_freeIOInfos(ptr) res[inputname] = infos yc.engine_freeIOList(iList) return res
def getInputs(self): """ Get input metadata. Result format is the same as for :py:meth:`getOutputs` method, but the general case is that there is only one input named 'audio' and the sole relevant metadata are: :sampleRate: expected audio sampleRate :parameters: attached parameters Others fields should be set to 1. """ res = {} iList = yc.engine_getInputList(self.ptr) for inputname in iterPtrList(iList): ptr = yc.engine_getInputInfos(self.ptr,inputname) infos = {} if ptr: infos['sampleRate'] = ptr.contents.sampleRate infos['sampleStep'] = ptr.contents.sampleStep infos['frameLength'] = ptr.contents.frameLength infos['size'] = ptr.contents.size infos['parameters'] = dict((k,v) for k,v in iterPtrDict(ptr.contents.parameters)) yc.engine_freeIOInfos(ptr) res[inputname] = infos yc.engine_freeIOList(iList) return res