MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Compute

Method Compute

tensorflow/lite/kernels/internal/mfcc.cc:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void Mfcc::Compute(const std::vector<double>& spectrogram_frame,
47 std::vector<double>* output) const {
48 if (!initialized_) {
49 // LOG(ERROR) << "Mfcc not initialized.";
50 return;
51 }
52 std::vector<double> working;
53 mel_filterbank_.Compute(spectrogram_frame, &working);
54 for (int i = 0; i < working.size(); ++i) {
55 double val = working[i];
56 if (val < kFilterbankFloor) {
57 val = kFilterbankFloor;
58 }
59 working[i] = log(val);
60 }
61 dct_.Compute(working, output);
62}
63
64} // namespace internal
65} // namespace tflite

Callers 1

EvalFunction · 0.45

Calls 2

logFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected