Skip to content

Commit 18493f2

Browse files
Create mfcc.h
1 parent 7e5c3e6 commit 18493f2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

inference-app/src/mfcc.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#ifndef MFCC_H
2+
#define MFCC_H
3+
4+
#include <stdint.h>
5+
#include <stddef.h>
6+
7+
class MFCC {
8+
public:
9+
MFCC(int num_mfcc_coeffs, int frame_size, int num_fft_points);
10+
~MFCC();
11+
12+
int init();
13+
void extract_mfcc(const int16_t* input, float32_t* output);
14+
15+
private:
16+
int _num_mfcc_coeffs;
17+
int _frame_size;
18+
int _num_fft_points;
19+
int16_t* _hanning_window;
20+
int16_t* _mel_filterbank;
21+
22+
// Other private member variables and functions specific to the implementation
23+
24+
// Define any private functions used internally by the class
25+
void apply_mel_filterbank(const int16_t* spectrum, float32_t* mel_energies);
26+
void compute_mfcc(float32_t* mfcc_output, const float32_t* mel_energies);
27+
};
28+
29+
#endif // MFCC_H

0 commit comments

Comments
 (0)