gather: dont restart transcribing if task has been killed

This commit is contained in:
Dave Horton
2022-04-11 21:13:49 -04:00
parent db5486de27
commit 24a0bc547f
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
FROM node:17.7.1-slim
FROM node:slim
WORKDIR /opt/app/
COPY package.json ./
RUN npm install
@@ -7,4 +7,4 @@ COPY . /opt/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
CMD [ "npm", "start" ]
CMD [ "npm", "start" ]

View File

@@ -385,7 +385,7 @@ class TaskGather extends Task {
}
}
if (evt.is_final) {
if (evt.alternatives[0].transcript === '' && !this.callSession.callGone) {
if (evt.alternatives[0].transcript === '' && !this.callSession.callGonen && !this.killed) {
this.logger.info({evt}, 'TaskGather:_onTranscription - got empty transcript, listen again');
return this._startTranscribing(ep);
}