TTS: force speak on first message in new chat

This commit is contained in:
Cohee 2023-11-09 01:30:54 +02:00
parent 0e89bf90bc
commit ca1c0e35b1
1 changed files with 7 additions and 1 deletions

View File

@ -122,6 +122,12 @@ async function moduleWorker() {
) {
currentMessageNumber = context.chat.length ? context.chat.length : 0
saveLastValues()
// Force to speak on the first message in the new chat
if (context.chat.length === 1) {
lastMessageHash = -1;
}
return
}
@ -771,7 +777,7 @@ export async function initVoiceMap(){
// Clear existing voiceMap state
$('#tts_voicemap_block').empty()
voiceMapEntries = []
// Get characters in current chat
const characters = getCharacters()