asr.h 706 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef ASR_ASR_H_
  2. #define ASR_ASR_H_
  3. #define NPU_CONTIN_CAL_EN 1 //npu是否支持一次性执行多条计算指令
  4. #define NPU_MEMCPY_EN 1 //是否使用npu执行memcpy, NPU_CONTIN_CAL_EN要打开
  5. #define MAX_NPU_MATRIX 48 //npu一次性最多执行多少条指令
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #define ASR_PREFETCH_EN 1
  10. #define ASR_LOG_EN 1
  11. int Wanson_ASR_Init();
  12. void Wanson_ASR_Reset();
  13. int Wanson_ASR_Recog(short *buf, int buf_len, const char **text, float *score);
  14. void Wanson_ASR_Release();
  15. #ifdef __cplusplus
  16. }
  17. #endif
  18. u32 asr_alg_process(short *ptr);
  19. void asr_alg_start(void);
  20. void asr_alg_init(void);
  21. void asr_alg_stop(void);
  22. #endif