Skip to content

Commit

Permalink
Add rnnoise_get_frame_size()
Browse files Browse the repository at this point in the history
It provides a mean to know how many samples are processed at time.
  • Loading branch information
lu-zero authored and petterreinholdtsen committed Jan 22, 2021
1 parent 40a3816 commit eca42a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/rnnoise.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ typedef struct RNNModel RNNModel;

RNNOISE_EXPORT int rnnoise_get_size();

RNNOISE_EXPORT int rnnoise_get_frame_size();

RNNOISE_EXPORT int rnnoise_init(DenoiseState *st, RNNModel *model);

RNNOISE_EXPORT DenoiseState *rnnoise_create(RNNModel *model);
Expand Down
4 changes: 4 additions & 0 deletions src/denoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ int rnnoise_get_size() {
return sizeof(DenoiseState);
}

int rnnoise_get_frame_size() {
return FRAME_SIZE;
}

int rnnoise_init(DenoiseState *st, RNNModel *model) {
memset(st, 0, sizeof(*st));
if (model)
Expand Down

0 comments on commit eca42a4

Please sign in to comment.