mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
fix setting initial config
This commit is contained in:
@@ -99,7 +99,6 @@ class Cognigy extends Task {
|
|||||||
await super.exec(cs);
|
await super.exec(cs);
|
||||||
|
|
||||||
const opts = {
|
const opts = {
|
||||||
session: {
|
|
||||||
synthesizer: this.data.synthesizer || {
|
synthesizer: this.data.synthesizer || {
|
||||||
vendor: 'default',
|
vendor: 'default',
|
||||||
language: 'default',
|
language: 'default',
|
||||||
@@ -113,7 +112,6 @@ class Cognigy extends Task {
|
|||||||
bot: this.data.bot || {},
|
bot: this.data.bot || {},
|
||||||
user: this.data.user || {},
|
user: this.data.user || {},
|
||||||
dtmf: this.data.dtmf || {}
|
dtmf: this.data.dtmf || {}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
this.config = new SpeechConfig({logger: this.logger, ep, opts});
|
this.config = new SpeechConfig({logger: this.logger, ep, opts});
|
||||||
this.ep = ep;
|
this.ep = ep;
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ const stripNulls = (obj) => {
|
|||||||
return obj;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const defaultSpeechConfig
|
|
||||||
|
|
||||||
class SpeechConfig extends Emitter {
|
class SpeechConfig extends Emitter {
|
||||||
constructor({logger, ep, opts = {}}) {
|
constructor({logger, ep, opts = {}}) {
|
||||||
super();
|
super();
|
||||||
@@ -19,7 +16,7 @@ class SpeechConfig extends Emitter {
|
|||||||
this.update(opts);
|
this.update(opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
_mergeConfig(changedConfig = {}){
|
_mergeConfig(changedConfig = {}) {
|
||||||
const merged = lodash.merge(
|
const merged = lodash.merge(
|
||||||
{},
|
{},
|
||||||
this.sessionConfig,
|
this.sessionConfig,
|
||||||
|
|||||||
@@ -318,7 +318,9 @@ class TaskGather extends Task {
|
|||||||
}
|
}
|
||||||
if (evt.is_final) this._resolve('speech', evt);
|
if (evt.is_final) this._resolve('speech', evt);
|
||||||
else {
|
else {
|
||||||
if (evt.stability > 0.70 && this.bargein && evt.alternatives[0].transcript.split(' ').length >= this.minBargeinWordCount) {
|
if (evt.stability > 0.70 &&
|
||||||
|
this.bargein &&
|
||||||
|
evt.alternatives[0].transcript.split(' ').length >= this.minBargeinWordCount) {
|
||||||
this.logger.debug('Gather:_onTranscription - killing audio due to bargein');
|
this.logger.debug('Gather:_onTranscription - killing audio due to bargein');
|
||||||
this._killAudio(cs);
|
this._killAudio(cs);
|
||||||
this._resolve('speech', evt);
|
this._resolve('speech', evt);
|
||||||
|
|||||||
Reference in New Issue
Block a user