Commit f41594b7 authored by Mickael Rouvier's avatar Mickael Rouvier
Browse files

option for adaptation state

parent ff59ebf8
......@@ -175,11 +175,11 @@ int main(int argc, char *argv[]) {
OnlineTimingStats timing_stats;
OnlineIvectorExtractorAdaptationState adaptation_state(feature_info.ivector_extractor_info);
for (; !spk2utt_reader.Done(); spk2utt_reader.Next()) {
std::string spk = spk2utt_reader.Key();
const std::vector<std::string> &uttlist = spk2utt_reader.Value();
OnlineIvectorExtractorAdaptationState adaptation_state(
feature_info.ivector_extractor_info);
for (size_t i = 0; i < uttlist.size(); i++) {
std::string utt = uttlist[i];
if (!wav_reader.HasKey(utt)) {
......@@ -193,6 +193,7 @@ int main(int argc, char *argv[]) {
SubVector<BaseFloat> data(wave_data.Data(), 0);
OnlineNnet2FeaturePipeline feature_pipeline(feature_info);
//ReadKaldiObject("final_adaptation_state.txt", &adaptation_state);
feature_pipeline.SetAdaptationState(adaptation_state);
SingleUtteranceNnet2Decoder decoder(nnet2_decoding_config,
......@@ -255,7 +256,14 @@ int main(int argc, char *argv[]) {
KALDI_LOG << "Decoded utterance " << utt;
num_done++;
}
cerr<<"SAVE adaptation state"<<endl;
WriteKaldiObject(adaptation_state, "adaptation_state.txt", false);
}
//cerr<<"SAVE FINAL adaptation state"<<endl;
//WriteKaldiObject(adaptation_state, "final_adaptation_state.txt", false);
timing_stats.Print(online);
KALDI_LOG << "Decoded " << num_done << " utterances, "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment