add support for playing silence in say verb

This commit is contained in:
Dave Horton
2022-02-24 15:04:44 -05:00
parent 5b11b6e401
commit 059fa6c7c9

View File

@@ -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,