You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
957 B
34 lines
957 B
#ifndef VOICE_RECORDER_H |
|
#define VOICE_RECORDER_H |
|
|
|
#include <stdint.h> |
|
#include <stddef.h> |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
struct voice_recorder; |
|
|
|
int voice_recorder_init(const char* db_path); |
|
void voice_recorder_deinit(void); |
|
|
|
int voice_recorder_start(const char* channel_id, int sample_rate, int channels); |
|
int voice_recorder_feed(const int16_t* samples, int count); |
|
int voice_recorder_stop(int* out_duration_ms); |
|
void voice_recorder_cancel(void); |
|
int voice_recorder_is_active(void); |
|
|
|
void voice_recorder_set_preset(int preset); |
|
int voice_recorder_get_preset(void); |
|
void voice_recorder_set_compressor_enabled(int enabled); |
|
int voice_recorder_is_compressor_enabled(void); |
|
void voice_recorder_set_compressor_config(int max_gain_db, int lookback_ms, int lookahead_ms, |
|
float rise_rate_per_500ms, float target_level_db); |
|
float voice_recorder_get_peak_level(void); |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#endif
|
|
|