Example #1
0
 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
Example #2
0
 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
Example #3
0
 def readAllOutputs(self):
     """
         Read all outputs. 
         
         :return: dictionary with output name as key and numpy.array as value. 
     """
     res = {}
     oList = yc.engine_getOutputList(self.ptr)
     for o in iterPtrList(oList):
         res[o] = self.readOutput(o)
     return res
Example #4
0
 def readAllOutputs(self):
     """
         Read all outputs. 
         
         :return: dictionary with output name as key and numpy.array as value. 
     """
     res = {}
     oList = yc.engine_getOutputList(self.ptr)
     for o in iterPtrList(oList):
         res[o] = self.readOutput(o)
     return res