mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix race condition duplicates TTS UI if autoload chat enabled
This commit is contained in:
@ -749,10 +749,6 @@ class VoiceMapEntry {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function initVoiceMap(){
|
export async function initVoiceMap(){
|
||||||
// Clear existing voiceMap state
|
|
||||||
$('#tts_voicemap_block').empty()
|
|
||||||
voiceMapEntries = []
|
|
||||||
|
|
||||||
// Gate initialization if not enabled or TTS Provider not ready. Prevents error popups.
|
// Gate initialization if not enabled or TTS Provider not ready. Prevents error popups.
|
||||||
const enabled = $('#tts_enabled').is(':checked')
|
const enabled = $('#tts_enabled').is(':checked')
|
||||||
if (!enabled){
|
if (!enabled){
|
||||||
@ -770,6 +766,10 @@ export async function initVoiceMap(){
|
|||||||
|
|
||||||
setTtsStatus("TTS Provider Loaded", true)
|
setTtsStatus("TTS Provider Loaded", true)
|
||||||
|
|
||||||
|
// Clear existing voiceMap state
|
||||||
|
$('#tts_voicemap_block').empty()
|
||||||
|
voiceMapEntries = []
|
||||||
|
|
||||||
// Get characters in current chat
|
// Get characters in current chat
|
||||||
const characters = getCharacters()
|
const characters = getCharacters()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user