diff --git a/speechx/speechx/common/frontend/feature_cache.cc b/speechx/speechx/common/frontend/feature_cache.cc index 6bce4464e..c166bd64b 100644 --- a/speechx/speechx/common/frontend/feature_cache.cc +++ b/speechx/speechx/common/frontend/feature_cache.cc @@ -43,13 +43,13 @@ bool FeatureCache::Read(std::vector* feats) { result = Compute(); } while (result); } + if (cache_.empty()) return false; // read from cache *feats = cache_.front(); cache_.pop(); - //ready_feed_condition_.notify_one(); - VLOG(2) << "FeatureCache::Read cost: " << timer.Elapsed() << " sec."; + VLOG(1) << "FeatureCache::Read cost: " << timer.Elapsed() << " sec."; return true; } @@ -79,4 +79,4 @@ bool FeatureCache::Compute() { return true; } -} // namespace ppspeech \ No newline at end of file +} // namespace ppspeech