提交 6dbf3081 编写于 作者: Y Yang Zhou

fix comment

上级 583c62db
...@@ -30,7 +30,8 @@ class AudioCache : public FrontendInterface { ...@@ -30,7 +30,8 @@ class AudioCache : public FrontendInterface {
virtual bool Read(kaldi::Vector<kaldi::BaseFloat>* waves); virtual bool Read(kaldi::Vector<kaldi::BaseFloat>* waves);
// the audio dim is 1, one sample, we return size_ instead. // the audio dim is 1, one sample, which is useless,
// so we return size_(cache samples) instead.
virtual size_t Dim() const { return size_; } virtual size_t Dim() const { return size_; }
virtual void SetFinished() { virtual void SetFinished() {
......
...@@ -25,7 +25,7 @@ class StreamingFeatureTpl : public FrontendInterface { ...@@ -25,7 +25,7 @@ class StreamingFeatureTpl : public FrontendInterface {
typedef typename F::Options Options; typedef typename F::Options Options;
StreamingFeatureTpl(const Options& opts, StreamingFeatureTpl(const Options& opts,
std::unique_ptr<FrontendInterface> base_extractor); std::unique_ptr<FrontendInterface> base_extractor);
virtual void Accept(const kaldi::VectorBase<kaldi::BaseFloat>& inputs); virtual void Accept(const kaldi::VectorBase<kaldi::BaseFloat>& waves);
virtual bool Read(kaldi::Vector<kaldi::BaseFloat>* feats); virtual bool Read(kaldi::Vector<kaldi::BaseFloat>* feats);
// the dim_ is the dim of single frame feature // the dim_ is the dim of single frame feature
...@@ -51,4 +51,4 @@ class StreamingFeatureTpl : public FrontendInterface { ...@@ -51,4 +51,4 @@ class StreamingFeatureTpl : public FrontendInterface {
} // namespace ppspeech } // namespace ppspeech
#include "frontend/audio/feature_common_inl.h" #include "frontend/audio/feature_common_inl.h"
\ No newline at end of file
...@@ -25,8 +25,8 @@ StreamingFeatureTpl<F>::StreamingFeatureTpl(const Options& opts, ...@@ -25,8 +25,8 @@ StreamingFeatureTpl<F>::StreamingFeatureTpl(const Options& opts,
} }
template <class F> template <class F>
void StreamingFeatureTpl<F>::Accept(const kaldi::VectorBase<kaldi::BaseFloat>& inputs) { void StreamingFeatureTpl<F>::Accept(const kaldi::VectorBase<kaldi::BaseFloat>& waves) {
base_extractor_->Accept(inputs); base_extractor_->Accept(waves);
} }
template <class F> template <class F>
...@@ -92,4 +92,4 @@ bool StreamingFeatureTpl<F>::Compute(const kaldi::Vector<kaldi::BaseFloat>& wave ...@@ -92,4 +92,4 @@ bool StreamingFeatureTpl<F>::Compute(const kaldi::Vector<kaldi::BaseFloat>& wave
return true; return true;
} }
} // namespace ppspeech } // namespace ppspeech
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册