def testExtractor(self): extr = Extractor([Feature("MFCC", [ Transform("Window", length=512), Transform("RDFT"), Transform("SpectralEnergy"), Transform("FilterBank", squared="true"), Transform("Log"), Transform("DCT"), Transform("Selector", length=16)])], buffer_size=48000, sampling_rate=16000) buffer = numpy.ones(48000, dtype=numpy.int16) buffer *= 1000 results = extr.calculate(buffer) print("Calculated results: %s" % results["MFCC"])
def testExtractor(self): extr = Extractor([ Feature("MFCC", [ Transform("Window", length=512), Transform("RDFT"), Transform("SpectralEnergy"), Transform("FilterBank", squared="true"), Transform("Log"), Transform("DCT"), Transform("Selector", length=16) ]) ], buffer_size=48000, sampling_rate=16000) buffer = numpy.ones(48000, dtype=numpy.int16) buffer *= 1000 results = extr.calculate(buffer) print("Calculated results: %s" % results["MFCC"])
def testExtractor(self): extr = Extractor([Feature("MFCC", [Transform("Window", parameters={"length": "512"}), Transform("RDFT"), Transform("SpectralEnergy"), Transform("FilterBank", parameters={"squared": "true"}), Transform("Log"), Transform("DCT"), Transform("Selector", parameters={"length": "16"})] )], 48000, 16000) buffer = numpy.ones(48000, dtype=numpy.int16) buffer *= 1000 results = extr.calculate(buffer) print("Calculated results:") print(results["MFCC"])