MCPcopy Create free account
hub / github.com/ARM-software/armnn / MfccCompute

Method MfccCompute

samples/common/src/Audio/MFCC.cpp:263–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263std::vector<float> MFCC::MfccCompute(const std::vector<float>& audioData)
264{
265 this->MfccComputePreFeature(audioData);
266
267 std::vector<float> mfccOut(this->m_params.m_numMfccFeatures);
268
269 float * ptrMel = this->m_melEnergies.data();
270 float * ptrDct = this->m_dctMatrix.data();
271 float * ptrMfcc = mfccOut.data();
272
273 /* Take DCT. Uses matrix mul. */
274 for (size_t i = 0, j = 0; i < mfccOut.size();
275 ++i, j += this->m_params.m_numFbankBins)
276 {
277 *ptrMfcc++ = MathUtils::DotProductF32(
278 ptrDct + j,
279 ptrMel,
280 this->m_params.m_numFbankBins);
281 }
282 return mfccOut;
283}
284
285std::vector<std::vector<float>> MFCC::CreateMelFilterBank()
286{

Callers 2

MFCCTest.cppFile · 0.80
InvokeMethod · 0.80

Calls 3

MfccComputePreFeatureMethod · 0.95
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected