diff --git a/speechx/speechx/frontend/audio/audio_cache.h b/speechx/speechx/frontend/audio/audio_cache.h index 45498e46f2360dc32303eaeec8168c4f6648c38d..e31a8aeb57e2ec0d6e9d0d101767e2073ba4b9f3 100644 --- a/speechx/speechx/frontend/audio/audio_cache.h +++ b/speechx/speechx/frontend/audio/audio_cache.h @@ -30,7 +30,8 @@ class AudioCache : public FrontendInterface { virtual bool Read(kaldi::Vector* 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 void SetFinished() { diff --git a/speechx/speechx/frontend/audio/feature_common.h b/speechx/speechx/frontend/audio/feature_common.h index 0763f0122ff22551a0ed7e2ce7530893f35a2a50..e03634d35a0723ae5a2f659e4a9732787106942c 100644 --- a/speechx/speechx/frontend/audio/feature_common.h +++ b/speechx/speechx/frontend/audio/feature_common.h @@ -25,7 +25,7 @@ class StreamingFeatureTpl : public FrontendInterface { typedef typename F::Options Options; StreamingFeatureTpl(const Options& opts, std::unique_ptr base_extractor); - virtual void Accept(const kaldi::VectorBase& inputs); + virtual void Accept(const kaldi::VectorBase& waves); virtual bool Read(kaldi::Vector* feats); // the dim_ is the dim of single frame feature @@ -51,4 +51,4 @@ class StreamingFeatureTpl : public FrontendInterface { } // namespace ppspeech -#include "frontend/audio/feature_common_inl.h" \ No newline at end of file +#include "frontend/audio/feature_common_inl.h" diff --git a/speechx/speechx/frontend/audio/feature_common_inl.h b/speechx/speechx/frontend/audio/feature_common_inl.h index 0199ab4116df363863588885812b425425e2bb17..a482ef557f65f2ecf4d94179841aa8fcae1e58d6 100644 --- a/speechx/speechx/frontend/audio/feature_common_inl.h +++ b/speechx/speechx/frontend/audio/feature_common_inl.h @@ -25,8 +25,8 @@ StreamingFeatureTpl::StreamingFeatureTpl(const Options& opts, } template -void StreamingFeatureTpl::Accept(const kaldi::VectorBase& inputs) { - base_extractor_->Accept(inputs); +void StreamingFeatureTpl::Accept(const kaldi::VectorBase& waves) { + base_extractor_->Accept(waves); } template @@ -92,4 +92,4 @@ bool StreamingFeatureTpl::Compute(const kaldi::Vector& wave return true; } -} // namespace ppspeech \ No newline at end of file +} // namespace ppspeech