mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-02-13 09:49:30 +00:00
feat/971 - fix to allow hints objects array (#987)
This commit is contained in:
@@ -155,7 +155,8 @@ class TaskGather extends SttTask {
|
|||||||
const {hints, hintsBoost} = cs.globalSttHints;
|
const {hints, hintsBoost} = cs.globalSttHints;
|
||||||
const setOfHints = new Set((this.data.recognizer.hints || [])
|
const setOfHints = new Set((this.data.recognizer.hints || [])
|
||||||
.concat(hints)
|
.concat(hints)
|
||||||
.filter((h) => typeof h === 'string' && h.length > 0));
|
// allow for hints to be an array of object
|
||||||
|
.filter((h) => (typeof h === 'string' && h.length > 0) || (typeof h === 'object')));
|
||||||
this.data.recognizer.hints = [...setOfHints];
|
this.data.recognizer.hints = [...setOfHints];
|
||||||
if (!this.data.recognizer.hintsBoost && hintsBoost) this.data.recognizer.hintsBoost = hintsBoost;
|
if (!this.data.recognizer.hintsBoost && hintsBoost) this.data.recognizer.hintsBoost = hintsBoost;
|
||||||
this.logger.debug({hints: this.data.recognizer.hints, hintsBoost: this.data.recognizer.hintsBoost},
|
this.logger.debug({hints: this.data.recognizer.hints, hintsBoost: this.data.recognizer.hintsBoost},
|
||||||
|
|||||||
Reference in New Issue
Block a user