Skip to content

Commit b80b746

Browse files
authored
Limit number of features frames in the cache (#129)
1 parent 434bafa commit b80b746

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

android/SherpaNcnn/.idea/deploymentTargetDropDown.xml

-17
This file was deleted.

sherpa-ncnn/csrc/features.cc

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace sherpa_ncnn {
2727

2828
FeatureExtractor::FeatureExtractor(const knf::FbankOptions &opts)
2929
: opts_(opts) {
30+
// cache 100 seconds of feature frames, which is more than enough
31+
// for real needs
32+
opts_.frame_opts.max_feature_vectors = 100 * 100;
3033
fbank_ = std::make_unique<knf::OnlineFbank>(opts_);
3134
}
3235

0 commit comments

Comments
 (0)