Simon Giddings - 2020-08-20

I am creating a config object by calling

pConfig = cmd_ln_init(nullptr, ps_args(), TRUE,
"-hmm", strModel,
"-dict", strDictionary,
"-samplerate", "16000",
"-topn", strMaxTopGaussians,
"-wbeam", m_strWBeam[iBeamIndex],
"-beam", m_strBeam[iBeamIndex],
"-maxhmmpf", "-1",
"-frate", std::to_string(m_ucFrameRate),
"-fsgusefiller", "no",
"-backtrace", "yes",
"-remove_noise", "no",
nullptr);

However, this appears highly ineficient when doing multiple searches one after the other (10 - 15), as each call will re-load the model each time, as well as the dictonary.

Is there a way to create a single, reusable, config and then update the relevant parameters as necessary, such as wbeam and beam ?