Move AllTalk event handlers setup up

This commit is contained in:
Cohee
2024-12-08 00:48:44 +02:00
parent bf4357774d
commit 1d3abf54a5

View File

@ -262,13 +262,13 @@ class AllTalkTtsProvider {
console.debug('AllTalkTTS: Settings loaded'); console.debug('AllTalkTTS: Settings loaded');
try { try {
// Check if TTS provider is ready // Check if TTS provider is ready
this.setupEventListeners();
this.updateLanguageDropdown();
await this.checkReady(); await this.checkReady();
await this.updateSettingsFromServer(); // Fetch dynamic settings from the TTS server await this.updateSettingsFromServer(); // Fetch dynamic settings from the TTS server
await this.fetchTtsVoiceObjects(); // Fetch voices only if service is ready await this.fetchTtsVoiceObjects(); // Fetch voices only if service is ready
await this.fetchRvcVoiceObjects(); // Fetch RVC voices await this.fetchRvcVoiceObjects(); // Fetch RVC voices
this.updateNarratorVoicesDropdown(); this.updateNarratorVoicesDropdown();
this.updateLanguageDropdown();
this.setupEventListeners();
this.applySettingsToHTML(); this.applySettingsToHTML();
updateStatus('Ready'); updateStatus('Ready');
} catch (error) { } catch (error) {