Make trie parameter optional, building it on demand if not passed
This commit is contained in:
parent
3cc9b3711d
commit
b29d0abb1e
@ -200,7 +200,7 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lm && trie) {
|
||||
if (lm) {
|
||||
int status = DS_EnableDecoderWithLM(ctx,
|
||||
alphabet,
|
||||
lm,
|
||||
|
@ -98,7 +98,7 @@ audioStream.on('finish', () => {
|
||||
const model_load_end = process.hrtime(model_load_start);
|
||||
console.error('Loaded model in %ds.', totalTime(model_load_end));
|
||||
|
||||
if (args['lm'] && args['trie']) {
|
||||
if (args['lm']) {
|
||||
console.error('Loading language model from files %s %s', args['lm'], args['trie']);
|
||||
const lm_load_start = process.hrtime();
|
||||
model.enableDecoderWithLM(args['alphabet'], args['lm'], args['trie'],
|
||||
|
@ -82,7 +82,7 @@ def main():
|
||||
model_load_end = timer() - model_load_start
|
||||
print('Loaded model in {:.3}s.'.format(model_load_end), file=sys.stderr)
|
||||
|
||||
if args.lm and args.trie:
|
||||
if args.lm:
|
||||
print('Loading language model from files {} {}'.format(args.lm, args.trie), file=sys.stderr)
|
||||
lm_load_start = timer()
|
||||
ds.enableDecoderWithLM(args.alphabet, args.lm, args.trie, LM_WEIGHT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user