mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
Allow Say, Gather, Transcribe is able to finished if there is error for speech credential (#910)
* allow move to next task if say verb is failed because of speech credential * allow move to next task if say verb is failed because of speech credential * allow move to next task if say verb is failed because of speech credential * wip * wip
This commit is contained in:
@@ -2,6 +2,7 @@ const Task = require('./task');
|
||||
const assert = require('assert');
|
||||
const crypto = require('crypto');
|
||||
const { TaskPreconditions, CobaltTranscriptionEvents } = require('../utils/constants');
|
||||
const { SpeechCredentialError } = require('../utils/error');
|
||||
|
||||
class SttTask extends Task {
|
||||
|
||||
@@ -190,7 +191,7 @@ class SttTask extends Task {
|
||||
target_sid: cs.callSid
|
||||
}).catch((err) => this.logger.info({err}, 'Error generating alert for no stt'));
|
||||
// the ASR might have fallback configuration, should not done task here.
|
||||
throw new Error(`No speech-to-text service credentials for ${vendor} have been configured`);
|
||||
throw new SpeechCredentialError(`No speech-to-text service credentials for ${vendor} have been configured`);
|
||||
}
|
||||
|
||||
if (vendor === 'nuance' && credentials.client_id) {
|
||||
|
||||
Reference in New Issue
Block a user