Fix ESLint errors

bce6f3eef0d284a48e029ac376da9dd6a9d07934

Boof2015 <75185879+Boof2015@users.noreply.github.com>

Signed
1 files changed, +14 -14Showing whitespace changes
public/scripts/extensions/tts/chatterbox.js+14 -14
@@ -134,7 +134,7 @@ class ChatterboxTtsProvider {
134 </select>134 </select>
135 </div>`;135 </div>`;
136136
137 html += `</div>`; // End params section137 html += '</div>'; // End params section
138138
139 // Footer with links139 // Footer with links
140 html += `<div class="chatterbox-footer">140 html += `<div class="chatterbox-footer">
@@ -142,7 +142,7 @@ class ChatterboxTtsProvider {
142 <a href="https://github.com/devnen/Chatterbox-TTS-Server" target="_blank">Documentation</a>142 <a href="https://github.com/devnen/Chatterbox-TTS-Server" target="_blank">Documentation</a>
143 </div>`;143 </div>`;
144144
145 html += `</div>`; // End container145 html += '</div>'; // End container
146146
147 // Add CSS styles147 // Add CSS styles
148 html += `<style>148 html += `<style>
@@ -314,7 +314,7 @@ class ChatterboxTtsProvider {
314 name: voice.display_name,314 name: voice.display_name,
315 voice_id: voice.voice_id,315 voice_id: voice.voice_id,
316 preview_url: null,316 preview_url: null,
317 lang: voice.language || 'en'317 lang: voice.language || 'en',
318 }));318 }));
319319
320 // Always try to fetch reference voices320 // Always try to fetch reference voices
@@ -327,7 +327,7 @@ class ChatterboxTtsProvider {
327 name: `[Clone] ${filename}`,327 name: `[Clone] ${filename}`,
328 voice_id: `ref_${filename}`,328 voice_id: `ref_${filename}`,
329 preview_url: null,329 preview_url: null,
330 lang: 'en'330 lang: 'en',
331 }));331 }));
332 }332 }
333 } catch (error) {333 } catch (error) {
@@ -460,7 +460,7 @@ class ChatterboxTtsProvider {
460 try {460 try {
461 this.updateStatus('Processing');461 this.updateStatus('Processing');
462462
463 const previewText = "Hello! This is a preview of the selected voice.";463 const previewText = 'Hello! This is a preview of the selected voice.';
464464
465 // Determine if this is a reference voice465 // Determine if this is a reference voice
466 let isReferenceVoice = false;466 let isReferenceVoice = false;
@@ -482,7 +482,7 @@ class ChatterboxTtsProvider {
482 speed_factor: this.settings.speed_factor,482 speed_factor: this.settings.speed_factor,
483 language: this.settings.language,483 language: this.settings.language,
484 split_text: false, // Don't split for preview484 split_text: false, // Don't split for preview
485 output_format: this.settings.output_format485 output_format: this.settings.output_format,
486 };486 };
487487
488 // Add voice-specific parameters488 // Add voice-specific parameters
@@ -495,9 +495,9 @@ class ChatterboxTtsProvider {
495 const response = await fetch(`${this.settings.provider_endpoint}/tts`, {495 const response = await fetch(`${this.settings.provider_endpoint}/tts`, {
496 method: 'POST',496 method: 'POST',
497 headers: {497 headers: {
498 'Content-Type': 'application/json'498 'Content-Type': 'application/json',
499 },499 },
500 body: JSON.stringify(requestBody)500 body: JSON.stringify(requestBody),
501 });501 });
502502
503 if (!response.ok) {503 if (!response.ok) {
@@ -537,7 +537,7 @@ class ChatterboxTtsProvider {
537 let match = this.voices.find(voice =>537 let match = this.voices.find(voice =>
538 voice.name === voiceName ||538 voice.name === voiceName ||
539 voice.voice_id === voiceName ||539 voice.voice_id === voiceName ||
540 voice.display_name === voiceName540 voice.display_name === voiceName,
541 );541 );
542542
543 if (!match) {543 if (!match) {
@@ -549,7 +549,7 @@ class ChatterboxTtsProvider {
549 name: `[Clone] ${filename}`,549 name: `[Clone] ${filename}`,
550 voice_id: voiceName,550 voice_id: voiceName,
551 preview_url: null,551 preview_url: null,
552 lang: 'en'552 lang: 'en',
553 };553 };
554 }554 }
555 // Return a default voice object555 // Return a default voice object
@@ -557,7 +557,7 @@ class ChatterboxTtsProvider {
557 name: voiceName || 'Default',557 name: voiceName || 'Default',
558 voice_id: voiceName || this.settings.predefined_voice || 'S1',558 voice_id: voiceName || this.settings.predefined_voice || 'S1',
559 preview_url: null,559 preview_url: null,
560 lang: 'en'560 lang: 'en',
561 };561 };
562 }562 }
563563
@@ -593,7 +593,7 @@ class ChatterboxTtsProvider {
593 language: this.settings.language,593 language: this.settings.language,
594 split_text: this.settings.split_text,594 split_text: this.settings.split_text,
595 chunk_size: this.settings.chunk_size,595 chunk_size: this.settings.chunk_size,
596 output_format: this.settings.output_format596 output_format: this.settings.output_format,
597 };597 };
598598
599 // Add voice-specific parameters599 // Add voice-specific parameters
@@ -609,9 +609,9 @@ class ChatterboxTtsProvider {
609 method: 'POST',609 method: 'POST',
610 headers: {610 headers: {
611 'Content-Type': 'application/json',611 'Content-Type': 'application/json',
612 'Cache-Control': 'no-cache'612 'Cache-Control': 'no-cache',
613 },613 },
614 body: JSON.stringify(requestBody)614 body: JSON.stringify(requestBody),
615 });615 });
616616
617 if (!response.ok) {617 if (!response.ok) {