雾聪
2024-04-01 930fe72f43524b4e355ef671c7180cc6cf9eefb5
runtime/onnxruntime/include/audio.h
@@ -40,7 +40,16 @@
    int global_end = 0;   // the end of a frame in the global time axis. in ms
};
class Audio {
#ifdef _WIN32
#ifdef _FUNASR_API_EXPORT
#define DLLAPI __declspec(dllexport)
#else
#define DLLAPI __declspec(dllimport)
#endif
#else
#define DLLAPI
#endif
class DLLAPI Audio {
  private:
    float *speech_data=nullptr;
    int16_t *speech_buff=nullptr;
@@ -74,6 +83,7 @@
    int FetchTpass(AudioFrame *&frame);
    int Fetch(float *&dout, int &len, int &flag);
    int Fetch(float *&dout, int &len, int &flag, float &start_time);
    int Fetch(float **&dout, int *&len, int *&flag, float*& start_time, int batch_size, int &batch_in);
    void Padding();
    void Split(OfflineStream* offline_streamj);
    void CutSplit(OfflineStream* offline_streamj);