fix bug with function call context

This commit is contained in:
ouoertheo 2023-08-25 08:51:35 -05:00
parent 3ab9aee195
commit 1417aa12f1
4 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ class EdgeTtsProvider {
$('#edge_tts_rate').val(this.settings.rate || 0);
$('#edge_tts_rate_output').text(this.settings.rate || 0);
$('#edge_tts_rate').on("input",this.onSettingsChange)
$('#edge_tts_rate').on("input", () => {this.onSettingsChange()})
this.checkReady()
console.info("Settings loaded")

View File

@ -88,7 +88,7 @@ class ElevenLabsTtsProvider {
async onConnectClick() {
// Update on Apply click
return await this.updateApiKey().catch( (error) => {
throw error
toastr.error(`ElevenLabs: ${error}`)
})
}

View File

@ -63,7 +63,7 @@ class SileroTtsProvider {
}, 2000);
$('#silero_tts_endpoint').val(this.settings.provider_endpoint)
$('#silero_tts_endpoint').on("input", this.onSettingsChange)
$('#silero_tts_endpoint').on("input", () => {this.onSettingsChange()})
this.checkReady()

View File

@ -146,8 +146,8 @@ class SystemTtsProvider {
$('#system_tts_pitch').val(this.settings.pitch || this.defaultSettings.pitch);
// Trigger updates
$('#system_tts_rate').on("input", this.onSettingsChange)
$('#system_tts_rate').on("input", this.onSettingsChange)
$('#system_tts_rate').on("input", () =>{this.onSettingsChange()})
$('#system_tts_rate').on("input", () => {this.onSettingsChange()})
$('#system_tts_pitch_output').text(this.settings.pitch);
$('#system_tts_rate_output').text(this.settings.rate);