From 5e5184983932d3cd9e3936300d598a7d8d92ec44 Mon Sep 17 00:00:00 2001 From: rammohan-y <37395033+rammohan-y@users.noreply.github.com> Date: Thu, 14 Aug 2025 06:26:56 +0530 Subject: [PATCH] Sending synthesized-audio notification for servedFromCache as false (#1320) * Sending synthesized-audio notification for servedFromCache as well https://github.com/jambonz/jambonz-feature-server/issues/1319 * Sending back the id that was set, to track the synthesized-audio e.g if we send a say verb having 100, it's synthesized-audio event will return 100 in the data to correleate the say verb and synthesized-audio event --- lib/tasks/tts-task.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/tasks/tts-task.js b/lib/tasks/tts-task.js index 97d5ab3b..8ab25de1 100644 --- a/lib/tasks/tts-task.js +++ b/lib/tasks/tts-task.js @@ -293,7 +293,18 @@ class TtsTask extends Task { vendor, language, characters: text.length, - elapsedTime: rtt + elapsedTime: rtt, + servedFromCache, + 'id': this.id + }); + } + if (servedFromCache) { + this.notifyStatus({ + event: 'synthesized-audio', + vendor, + language, + servedFromCache, + 'id': this.id }); } }