minor: allow hints not to be specified

This commit is contained in:
Dave Horton
2023-09-18 10:32:07 -04:00
parent d7affddd85
commit 76cf4e527f

View File

@@ -115,7 +115,7 @@ class TaskGather extends SttTask {
if (cs.hasGlobalSttHints && !this.maskGlobalSttHints) {
const {hints, hintsBoost} = cs.globalSttHints;
const setOfHints = new Set(this.data.recognizer.hints
const setOfHints = new Set((this.data.recognizer.hints || [])
.concat(hints)
.filter((h) => typeof h === 'string' && h.length > 0));
this.data.recognizer.hints = [...setOfHints];