blob: 3e78c604a17ddea5a6563206727c4476619a3087 [file] [log] [blame]
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef AUDIO_PREP_MFCC_H_
#define AUDIO_PREP_MFCC_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
typedef struct {
int num_frames;
int num_mel_bins;
float audio_samp_rate;
float low_edge_hz;
float upper_edge_hz;
float win_len_sec;
float hop_len_sec;
float log_floor;
float log_scaler;
} MfccParams;
void set_mfcc_params(MfccParams* params);
void extract_mfcc(int16_t* in, uint8_t* out, int in_len);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif // AUDIO_PREP_MFCC_H_