mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
fix linting
This commit is contained in:
@@ -10,7 +10,7 @@ const {
|
||||
const makeTask = require('./make_task');
|
||||
const assert = require('assert');
|
||||
|
||||
const GATHER_STABILITY_THRESHOLD = Number(process.env.JAMBONZ_GATHER_STABILITY_THRESHOLD || 0.7);
|
||||
const GATHER_STABILITY_THRESHOLD = Number(process.env.JAMBONZ_GATHER_STABILITY_THRESHOLD || 0.7);
|
||||
|
||||
class TaskGather extends Task {
|
||||
constructor(logger, opts, parentTask) {
|
||||
@@ -54,10 +54,10 @@ class TaskGather extends Task {
|
||||
if (this.say) this.sayTask = makeTask(this.logger, {say: this.say}, this);
|
||||
if (this.play) this.playTask = makeTask(this.logger, {play: this.play}, this);
|
||||
|
||||
if(this.sayTask || this.playTask){
|
||||
// this is specially for barge in where we want to make a bargebale promt
|
||||
// to a user without listening after the say task has finished
|
||||
this.listenAfterSpeech = typeof this.data.listenAfterSpeech === "boolean" ? this.data.listenAfterSpeech : true;
|
||||
if (this.sayTask || this.playTask) {
|
||||
// this is specially for barge in where we want to make a bargebale promt
|
||||
// to a user without listening after the say task has finished
|
||||
this.listenAfterSpeech = typeof this.data.listenAfterSpeech === 'boolean' ? this.data.listenAfterSpeech : true;
|
||||
}
|
||||
|
||||
this.parentTask = parentTask;
|
||||
@@ -326,11 +326,11 @@ class TaskGather extends Task {
|
||||
if (evt.is_final) this._resolve('speech', evt);
|
||||
else {
|
||||
const recognizeSuccess = evt.stability > GATHER_STABILITY_THRESHOLD;
|
||||
/*
|
||||
we need to make sure to only send something on barge in if we have
|
||||
/*
|
||||
we need to make sure to only send something on barge in if we have
|
||||
something valid therefore we need to check the recognition
|
||||
stability, which applies to GOOGLE
|
||||
for MS we will have a final event, meaning we will not run into
|
||||
for MS we will have a final event, meaning we will not run into
|
||||
the current if else branch.
|
||||
|
||||
For AWS we still need more testing
|
||||
|
||||
Reference in New Issue
Block a user