mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
feat/940 stopped calling updateSpeechCredentialLastUsed (#944)
This commit is contained in:
@@ -140,7 +140,6 @@ class TaskGather extends SttTask {
|
||||
async handling(cs, {ep}) {
|
||||
this.logger.debug({options: this.data}, 'Gather:exec');
|
||||
await super.exec(cs, {ep});
|
||||
const {updateSpeechCredentialLastUsed} = require('../utils/db-utils')(this.logger, cs.srf);
|
||||
|
||||
this.fillerNoise = {
|
||||
...(cs.fillerNoise || {}),
|
||||
@@ -210,7 +209,6 @@ class TaskGather extends SttTask {
|
||||
return;
|
||||
}
|
||||
this._startTranscribing(ep);
|
||||
return updateSpeechCredentialLastUsed(this.sttCredentials.speech_credential_sid);
|
||||
} catch (e) {
|
||||
await this._startFallback(cs, ep, {error: e});
|
||||
}
|
||||
@@ -290,8 +288,6 @@ class TaskGather extends SttTask {
|
||||
await this._setSpeechHandlers(cs, ep);
|
||||
if (!this.resolved && !this.killed) {
|
||||
this._startTranscribing(ep);
|
||||
updateSpeechCredentialLastUsed(this.sttCredentials.speech_credential_sid)
|
||||
.catch(() => {/*already logged error */});
|
||||
}
|
||||
else {
|
||||
this.logger.info('Gather:exec - task was killed or resolved quickly, not starting transcription');
|
||||
@@ -969,7 +965,6 @@ class TaskGather extends SttTask {
|
||||
bugname: this.bugname
|
||||
})
|
||||
.catch((err) => this.logger.error({err}, `Error stopping transcription for primary vendor ${this.vendor}`));
|
||||
const {updateSpeechCredentialLastUsed} = require('../utils/db-utils')(this.logger, cs.srf);
|
||||
try {
|
||||
this.logger.debug('gather:_startFallback');
|
||||
this.notifyError({ msg: 'ASR error',
|
||||
@@ -978,7 +973,6 @@ class TaskGather extends SttTask {
|
||||
this._speechHandlersSet = false;
|
||||
await this._setSpeechHandlers(cs, ep);
|
||||
this._startTranscribing(ep);
|
||||
updateSpeechCredentialLastUsed(this.sttCredentials.speech_credential_sid);
|
||||
return true;
|
||||
} catch (error) {
|
||||
this.logger.info({error}, `There is error while falling back to ${this.fallbackVendor}`);
|
||||
|
||||
Reference in New Issue
Block a user