Flute
2025-10-01 fa9a6cdb1eade68c258eed7297f5a8a8a5329ac6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
#ifndef VAD_MODEL_H
#define VAD_MODEL_H
 
#include <string>
#include <map>
#include <vector>
 
namespace funasr {
class VadModel {
  public:
    virtual ~VadModel(){};
    virtual void InitVad(const std::string &vad_model, const std::string &vad_cmvn, const std::string &vad_config, int thread_num)=0;
    virtual std::vector<std::vector<int>> Infer(std::vector<float> &waves, bool input_finished=true)=0;
    virtual int GetVadSampleRate() = 0;
};
 
VadModel *CreateVadModel(std::map<std::string, std::string>& model_path, int thread_num);
VadModel *CreateVadModel(void* fsmnvad_handle);
} // namespace funasr
#endif