-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_features.h
50 lines (42 loc) · 1 KB
/
get_features.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#define FEATURES_SIZE 4000
#define SAMPLE_SIZE 100
struct Features{
double features_array[FEATURES_SIZE];
int len;
};
typedef struct Features FTUS;
/**
*function :
* Get audio file's features
*
*audio_path :
* Audio file's path
*features :
* Used to save the audio features.
*get_sample_offset:
* Change the file pointer position when read sample audio file
*sample_flag:
* Control the synchronization of threads
*/
void get_audio_features(char *audio_path, FTUS *features, int *get_sample_offset, int *sample_flag);
/**
*function :
* Compare the raw'features and sample's
*
*raw_features :
* Raw audio's features
*sample_features :
* Sample audio's features
*/
int _compare_raw_sample( FTUS *raw_features, FTUS *sample_features);
int compare_raw_sample( FTUS *raw_features, FTUS *sample_features);
/**
*function :
* recognition the raw audio faetures
*
*compare_result:
* Compare the result of raw'features and sample's
*len :
* Compare_result' length
*/
int find_the_result(double *compare_result, int len);