ensure history is unique to voice

This commit is contained in:
ouoertheo
2023-04-21 12:40:06 -05:00
parent b5b0690f2b
commit 7ce03d71ff

View File

@@ -138,7 +138,7 @@ async function findTtsGenerationInHistory(message, voiceId) {
for (const history of ttsHistory) { for (const history of ttsHistory) {
const text = history.text; const text = history.text;
const itemId = history.history_item_id; const itemId = history.history_item_id;
if (message === text) { if (message === text && history.voice_id == voiceId) {
console.info(`Existing TTS history item ${itemId} found: ${text} `) console.info(`Existing TTS history item ${itemId} found: ${text} `)
return itemId; return itemId;
} }