From c5bd829aff79d145ae890eb1faf138492bbcd313 Mon Sep 17 00:00:00 2001 From: Junha Heo Date: Sun, 25 Aug 2024 21:02:37 +0900 Subject: [PATCH] refactor: Update TTS function to handle auto audio path --- src/ts/process/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index 483da9a8..86312035 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -1181,7 +1181,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n db.characters[selectedChar].chats[selectedChat] = currentChat setDatabase(db) } - await sayTTS(currentChar, result) + if(db.ttsAutoSpeech){ + await sayTTS(currentChar, result) + } } else{ const msgs = (req.type === 'success') ? [['char',req.result]] as const @@ -1240,7 +1242,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n mrerolls.push(result) } db.characters[selectedChar].reloadKeys += 1 - await sayTTS(currentChar, result) + if(db.ttsAutoSpeech){ + await sayTTS(currentChar, result) + } setDatabase(db) }