refactor: Update TTS function to handle auto audio path
This commit is contained in:
@@ -1181,7 +1181,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
|||||||
db.characters[selectedChar].chats[selectedChat] = currentChat
|
db.characters[selectedChar].chats[selectedChat] = currentChat
|
||||||
setDatabase(db)
|
setDatabase(db)
|
||||||
}
|
}
|
||||||
await sayTTS(currentChar, result)
|
if(db.ttsAutoSpeech){
|
||||||
|
await sayTTS(currentChar, result)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const msgs = (req.type === 'success') ? [['char',req.result]] as const
|
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)
|
mrerolls.push(result)
|
||||||
}
|
}
|
||||||
db.characters[selectedChar].reloadKeys += 1
|
db.characters[selectedChar].reloadKeys += 1
|
||||||
await sayTTS(currentChar, result)
|
if(db.ttsAutoSpeech){
|
||||||
|
await sayTTS(currentChar, result)
|
||||||
|
}
|
||||||
setDatabase(db)
|
setDatabase(db)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user