/*
 * Copyright 2022 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_
