fix current tts job not clearing on empty text

This commit is contained in:
ouoertheo
2023-05-22 08:15:02 -05:00
parent 03f2310c8b
commit ce648297ef

View File

@ -1,3 +1,4 @@
import { config } from 'yargs'
import { callPopup, cancelTtsPlay, isMultigenEnabled, is_send_press, saveSettingsDebounced } from '../../../script.js'
import { extension_settings, getContext } from '../../extensions.js'
import { getStringHash } from '../../utils.js'
@ -174,6 +175,7 @@ function debugTtsPlayback() {
"audioQueueProcessorReady": audioQueueProcessorReady,
"ttsJobQueue": ttsJobQueue,
"currentTtsJob": currentTtsJob,
"ttsConfig": extension_settings.tts
}
))
}
@ -372,6 +374,7 @@ async function processTtsQueue() {
try {
if (!text) {
console.warn('Got empty text in TTS queue job.');
completeTtsJob()
return;
}