MNN/source/backend/cpu/CPUStft.hpp

33 lines
839 B
C++
Raw Normal View History

2024-12-19 16:20:00 +08:00
//
// CPUStft.hpp
// MNN
//
// Created by MNN on 2024/11/26.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifdef MNN_BUILD_AUDIO
#ifndef CPUStft_hpp
#define CPUStft_hpp
#include "core/Execution.hpp"
namespace MNN {
class CPUStft : public Execution {
public:
CPUStft(Backend *backend, int nfft, int hop_length, bool abs);
virtual ~CPUStft() = default;
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
static std::vector<float> gSinTable;
static std::vector<float> gCosTable;
2024-12-19 16:20:00 +08:00
private:
int mNfft, mHopLength;
bool mAbs;
Tensor mTmpFrames;
};
} // namespace MNN
#endif /* CPUStft.hpp */
#endif // MNN_BUILD_AUDIO