From 059fa6c7c9fd056a611489d52cbb243389dfa3d7 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 24 Feb 2022 15:04:44 -0500 Subject: [PATCH] add support for playing silence in say verb --- lib/tasks/say.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tasks/say.js b/lib/tasks/say.js index 3d100f1d..7111d7e2 100644 --- a/lib/tasks/say.js +++ b/lib/tasks/say.js @@ -43,6 +43,9 @@ class TaskSay extends Task { // synthesize all of the text elements let lastUpdated = false; const filepath = (await Promise.all(this.text.map(async(text) => { + if (text.startsWith('silence://')) { + return `silence_stream://${text.slice(10)}`; + } const {filePath, servedFromCache} = await synthAudio(stats, { text, vendor,