mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
feat/952: removed unnecessary condition which is not logging the target_sid (#953)
This commit is contained in:
@@ -177,32 +177,22 @@ class TaskSay extends TtsTask {
|
|||||||
account_sid,
|
account_sid,
|
||||||
alert_type: AlertType.TTS_FAILURE,
|
alert_type: AlertType.TTS_FAILURE,
|
||||||
vendor,
|
vendor,
|
||||||
detail: evt.variable_tts_error
|
detail: evt.variable_tts_error,
|
||||||
|
target_sid
|
||||||
}).catch((err) => this.logger.info({err}, 'Error generating alert for no tts'));
|
}).catch((err) => this.logger.info({err}, 'Error generating alert for no tts'));
|
||||||
}
|
}
|
||||||
else {
|
if (evt.variable_tts_cache_filename && !this.killed) {
|
||||||
this.logger.debug({evt}, 'Say got playback-stop');
|
const text = parseTextFromSayString(this.text[segment]);
|
||||||
if (evt.variable_tts_error) {
|
addFileToCache(evt.variable_tts_cache_filename, {
|
||||||
writeAlerts({
|
account_sid,
|
||||||
account_sid,
|
vendor,
|
||||||
alert_type: AlertType.TTS_FAILURE,
|
language,
|
||||||
vendor,
|
voice,
|
||||||
detail: evt.variable_tts_error,
|
engine,
|
||||||
target_sid
|
text
|
||||||
}).catch((err) => this.logger.info({err}, 'Error generating alert for no tts'));
|
}).catch((err) => this.logger.info({err}, 'Error adding file to cache'));
|
||||||
}
|
|
||||||
if (evt.variable_tts_cache_filename && !this.killed) {
|
|
||||||
const text = parseTextFromSayString(this.text[segment]);
|
|
||||||
addFileToCache(evt.variable_tts_cache_filename, {
|
|
||||||
account_sid,
|
|
||||||
vendor,
|
|
||||||
language,
|
|
||||||
voice,
|
|
||||||
engine,
|
|
||||||
text
|
|
||||||
}).catch((err) => this.logger.info({err}, 'Error adding file to cache'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._playResolve) {
|
if (this._playResolve) {
|
||||||
evt.variable_tts_error ? this._playReject(new Error(evt.variable_tts_error)) : this._playResolve();
|
evt.variable_tts_error ? this._playReject(new Error(evt.variable_tts_error)) : this._playResolve();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user