mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
29 lines
453 B
C++
29 lines
453 B
C++
|
|
#ifndef FEATUREQUEUE_H
|
|
#define FEATUREQUEUE_H
|
|
|
|
#include "Tensor.h"
|
|
#include <queue>
|
|
#include <stdint.h>
|
|
using namespace std;
|
|
|
|
|
|
class FeatureQueue {
|
|
private:
|
|
queue<Tensor<float> *> feature_queue;
|
|
Tensor<float> *buff;
|
|
int buff_idx;
|
|
int window_size;
|
|
|
|
public:
|
|
FeatureQueue();
|
|
~FeatureQueue();
|
|
void reinit(int size);
|
|
void reset();
|
|
void push(float *din, int flag);
|
|
Tensor<float> *pop();
|
|
int size();
|
|
};
|
|
|
|
#endif
|