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);
|
||||
|
||||
const opts = {
|
||||
session: {
|
||||
synthesizer: this.data.synthesizer || {
|
||||
vendor: 'default',
|
||||
language: 'default',
|
||||
@@ -113,7 +112,6 @@ class Cognigy extends Task {
|
||||
bot: this.data.bot || {},
|
||||
user: this.data.user || {},
|
||||
dtmf: this.data.dtmf || {}
|
||||
}
|
||||
};
|
||||
this.config = new SpeechConfig({logger: this.logger, ep, opts});
|
||||
this.ep = ep;
|
||||
|
||||
@@ -7,9 +7,6 @@ const stripNulls = (obj) => {
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
||||
const defaultSpeechConfig
|
||||
|
||||
class SpeechConfig extends Emitter {
|
||||
constructor({logger, ep, opts = {}}) {
|
||||
super();
|
||||
@@ -19,7 +16,7 @@ class SpeechConfig extends Emitter {
|
||||
this.update(opts);
|
||||
}
|
||||
|
||||
_mergeConfig(changedConfig = {}){
|
||||
_mergeConfig(changedConfig = {}) {
|
||||
const merged = lodash.merge(
|
||||
{},
|
||||
this.sessionConfig,
|
||||
|
||||
@@ -318,7 +318,9 @@ class TaskGather extends Task {
|
||||
}
|
||||
if (evt.is_final) this._resolve('speech', evt);
|
||||
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._killAudio(cs);
|
||||
this._resolve('speech', evt);
|
||||
|
||||
Reference in New Issue
Block a user