#include <stdio.h>
#include <string.h>
#include <rnnoise.h>

int main() {
    DenoiseState *st = rnnoise_create(NULL);  // pass NULL for default model
    if (!st) {
        fprintf(stderr, "rnnoise_create failed\n");
        return 1;
    }

    float in[480];
    float out[480];
    memset(in, 0, sizeof(in));
    memset(out, 0, sizeof(out));

    float vad = rnnoise_process_frame(st, out, in);
    printf("VAD: %f\n", vad);

    rnnoise_destroy(st);
    return 0;
}
