|
|
@ -16,15 +16,15 @@
|
|
|
|
#pragma once
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "base/common.h"
|
|
|
|
#include "base/common.h"
|
|
|
|
|
|
|
|
#include "frontend/audio/feature_common.h"
|
|
|
|
#include "frontend/audio/frontend_itf.h"
|
|
|
|
#include "frontend/audio/frontend_itf.h"
|
|
|
|
#include "kaldi/feat/feature-window.h"
|
|
|
|
#include "kaldi/feat/feature-window.h"
|
|
|
|
#include "frontend/audio/feature_common.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace ppspeech {
|
|
|
|
namespace ppspeech {
|
|
|
|
|
|
|
|
|
|
|
|
struct LinearSpectrogramOptions {
|
|
|
|
struct LinearSpectrogramOptions {
|
|
|
|
kaldi::FrameExtractionOptions frame_opts;
|
|
|
|
kaldi::FrameExtractionOptions frame_opts;
|
|
|
|
LinearSpectrogramOptions(): frame_opts() {}
|
|
|
|
LinearSpectrogramOptions() : frame_opts() {}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class LinearSpectrogramComputer {
|
|
|
|
class LinearSpectrogramComputer {
|
|
|
@ -48,11 +48,10 @@ class LinearSpectrogramComputer {
|
|
|
|
Options opts_;
|
|
|
|
Options opts_;
|
|
|
|
int32 frame_length_;
|
|
|
|
int32 frame_length_;
|
|
|
|
int32 dim_;
|
|
|
|
int32 dim_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(LinearSpectrogramComputer);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef StreamingFeatureTpl<LinearSpectrogramComputer> LinearSpectrogram;
|
|
|
|
typedef StreamingFeatureTpl<LinearSpectrogramComputer> LinearSpectrogram;
|
|
|
|
|
|
|
|
|
|
|
|
//DISALLOW_COPY_AND_ASSIGN(LinearSpectrogram);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace ppspeech
|
|
|
|
} // namespace ppspeech
|