mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +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 setOfHints = new Set((this.data.recognizer.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];
|
||||
if (!this.data.recognizer.hintsBoost && hintsBoost) this.data.recognizer.hintsBoost = hintsBoost;
|
||||
this.logger.debug({hints: this.data.recognizer.hints, hintsBoost: this.data.recognizer.hintsBoost},
|
||||
|
||||
Reference in New Issue
Block a user