snowboy-detect-c-wrapper.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // snowboy-detect-c-wrapper.h
  2. // Copyright 2017 KITT.AI (author: Guoguo Chen)
  3. #ifndef SNOWBOY_DETECT_C_WRAPPER_H_
  4. #define SNOWBOY_DETECT_C_WRAPPER_H_
  5. #include <stdbool.h>
  6. #include <stdint.h>
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. typedef struct SnowboyDetect SnowboyDetect;
  11. SnowboyDetect* SnowboyDetectConstructor(const char* const resource_filename,
  12. const char* const model_str);
  13. bool SnowboyDetectReset(SnowboyDetect* detector);
  14. int SnowboyDetectRunDetection(SnowboyDetect* detector,
  15. const int16_t* const data,
  16. const int array_length, bool is_end);
  17. void SnowboyDetectSetSensitivity(SnowboyDetect* detector,
  18. const char* const sensitivity_str);
  19. void SnowboyDetectSetAudioGain(SnowboyDetect* detector,
  20. const float audio_gain);
  21. void SnowboyDetectUpdateModel(SnowboyDetect* detector);
  22. void SnowboyDetectApplyFrontend(SnowboyDetect* detector,
  23. const bool apply_frontend);
  24. int SnowboyDetectNumHotwords(SnowboyDetect* detector);
  25. int SnowboyDetectSampleRate(SnowboyDetect* detector);
  26. int SnowboyDetectNumChannels(SnowboyDetect* detector);
  27. int SnowboyDetectBitsPerSample(SnowboyDetect* detector);
  28. void SnowboyDetectDestructor(SnowboyDetect* detector);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif // SNOWBOY_DETECT_C_WRAPPER_H_